cpufreq: longhaul: Replace acpi_bus_get_device()
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 26 Jan 2022 19:43:59 +0000 (20:43 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 4 Feb 2022 18:31:49 +0000 (19:31 +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/cpufreq/longhaul.c

index c538a15..3e000e1 100644 (file)
@@ -668,9 +668,9 @@ static acpi_status longhaul_walk_callback(acpi_handle obj_handle,
                                          u32 nesting_level,
                                          void *context, void **return_value)
 {
-       struct acpi_device *d;
+       struct acpi_device *d = acpi_fetch_acpi_dev(obj_handle);
 
-       if (acpi_bus_get_device(obj_handle, &d))
+       if (!d)
                return 0;
 
        *return_value = acpi_driver_data(d);