diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2021-12-03 19:37:10 +0300 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2021-12-17 20:45:51 +0300 |
commit | 99ece713773bfa17fdb4ee2a1fb3b7bee82e4b1a (patch) | |
tree | dc5fc7a0bdbd65678c60cc8f1125191587e4e2e8 /drivers/acpi/resource.c | |
parent | e3c963c498871e0d4b2eceb32e2b989493838ccc (diff) | |
download | linux-99ece713773bfa17fdb4ee2a1fb3b7bee82e4b1a.tar.xz |
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/resource.c')
-rw-r--r-- | drivers/acpi/resource.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/acpi/resource.c b/drivers/acpi/resource.c index 3c25ce8c95ba..c2d494784425 100644 --- a/drivers/acpi/resource.c +++ b/drivers/acpi/resource.c @@ -791,9 +791,9 @@ static acpi_status acpi_res_consumer_cb(acpi_handle handle, u32 depth, { struct resource *res = context; struct acpi_device **consumer = (struct acpi_device **) ret; - struct acpi_device *adev; + struct acpi_device *adev = acpi_fetch_acpi_dev(handle); - if (acpi_bus_get_device(handle, &adev)) + if (!adev) return AE_OK; if (acpi_dev_consumes_res(adev, res)) { |