diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2021-12-03 17:37:10 +0100 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2021-12-17 18:45:51 +0100 |
commit | 99ece713773bfa17fdb4ee2a1fb3b7bee82e4b1a (patch) | |
tree | dc5fc7a0bdbd65678c60cc8f1125191587e4e2e8 /drivers/acpi/x86 | |
parent | ACPI: scan: Introduce acpi_fetch_acpi_dev() (diff) | |
download | linux-99ece713773bfa17fdb4ee2a1fb3b7bee82e4b1a.tar.xz linux-99ece713773bfa17fdb4ee2a1fb3b7bee82e4b1a.zip |
ACPI: Use acpi_fetch_acpi_dev() instead of acpi_bus_get_device()
Modify the ACPI code to use acpi_fetch_acpi_dev() instead of
acpi_bus_get_device() where applicable.
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'drivers/acpi/x86')
-rw-r--r-- | drivers/acpi/x86/s2idle.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/acpi/x86/s2idle.c b/drivers/acpi/x86/s2idle.c index 1c48358b43ba..abc06e7f89d8 100644 --- a/drivers/acpi/x86/s2idle.c +++ b/drivers/acpi/x86/s2idle.c @@ -293,9 +293,9 @@ static void lpi_check_constraints(void) for (i = 0; i < lpi_constraints_table_size; ++i) { acpi_handle handle = lpi_constraints_table[i].handle; - struct acpi_device *adev; + struct acpi_device *adev = acpi_fetch_acpi_dev(handle); - if (!handle || acpi_bus_get_device(handle, &adev)) + if (!adev) continue; acpi_handle_debug(handle, |