From 7f7b571becf3731dfa9aa50bed420e0c988e511d Mon Sep 17 00:00:00 2001 From: "Rafael J. Wysocki" Date: Tue, 1 Feb 2022 20:12:30 +0100 Subject: thunderbolt: Replace acpi_bus_get_device() Replace acpi_bus_get_device() that is going to be dropped with acpi_fetch_acpi_dev(). No intentional functional impact. Signed-off-by: Rafael J. Wysocki Signed-off-by: Mika Westerberg --- drivers/thunderbolt/acpi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/thunderbolt') diff --git a/drivers/thunderbolt/acpi.c b/drivers/thunderbolt/acpi.c index 79b5abf9d042..c89daac0ad8c 100644 --- a/drivers/thunderbolt/acpi.c +++ b/drivers/thunderbolt/acpi.c @@ -14,15 +14,15 @@ static acpi_status tb_acpi_add_link(acpi_handle handle, u32 level, void *data, void **return_value) { + struct acpi_device *adev = acpi_fetch_acpi_dev(handle); struct fwnode_reference_args args; struct fwnode_handle *fwnode; struct tb_nhi *nhi = data; - struct acpi_device *adev; struct pci_dev *pdev; struct device *dev; int ret; - if (acpi_bus_get_device(handle, &adev)) + if (!adev) return AE_OK; fwnode = acpi_fwnode_handle(adev); -- cgit v1.2.3