Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <rafael.j.wysocki@intel.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>

authored by

Rafael J. Wysocki and committed by
Mika Westerberg
7f7b571b 30a4eca6

+2 -2
+2 -2
drivers/thunderbolt/acpi.c
··· 14 14 static acpi_status tb_acpi_add_link(acpi_handle handle, u32 level, void *data, 15 15 void **return_value) 16 16 { 17 + struct acpi_device *adev = acpi_fetch_acpi_dev(handle); 17 18 struct fwnode_reference_args args; 18 19 struct fwnode_handle *fwnode; 19 20 struct tb_nhi *nhi = data; 20 - struct acpi_device *adev; 21 21 struct pci_dev *pdev; 22 22 struct device *dev; 23 23 int ret; 24 24 25 - if (acpi_bus_get_device(handle, &adev)) 25 + if (!adev) 26 26 return AE_OK; 27 27 28 28 fwnode = acpi_fwnode_handle(adev);