Skip to contentSkip to conversation

PNP: Replace acpi_bus_get_device()

PATCH New Rafael J. Wysocki 1 participant 1 message Jan 26, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 PNP: Replace acpi_bus_get_device()

From: Rafael J. Wysocki <[email protected]>

Replace acpi_bus_get_device() that is going to be dropped with acpi_fetch_acpi_dev().

No intentional functional impact.

---
 drivers/pnp/pnpacpi/core.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/pnp/pnpacpi/core.c +2 -2
Index: linux-pm/drivers/pnp/pnpacpi/core.c
===================================================================
@@ -287,9 +287,9 @@ static acpi_status __init pnpacpi_add_de
 						     u32 lvl, void *context,
 						     void **rv)
 {
-	struct acpi_device *device;
+	struct acpi_device *device = acpi_fetch_acpi_dev(handle);
 
-	if (acpi_bus_get_device(handle, &device))
+	if (!device)
 		return AE_CTRL_DEPTH;
 	if (acpi_is_pnp_device(device))
 		pnpacpi_add_device(device);