PNP: Replace acpi_bus_get_device()
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 26 Jan 2022 19:51:27 +0000 (20:51 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 4 Feb 2022 18:37:46 +0000 (19:37 +0100)
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>
drivers/pnp/pnpacpi/core.c

index afaf30a3622c0c6aedbf715dc8efa5cd6259c2c3..38928ff7472b0fad0d8fc7c07a0b5b765227a900 100644 (file)
@@ -287,9 +287,9 @@ static acpi_status __init pnpacpi_add_device_handler(acpi_handle handle,
                                                     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);