summaryrefslogtreecommitdiffstats
path: root/drivers/acpi/glue.c
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2021-10-27 18:59:06 +0200
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2021-10-28 16:53:24 +0200
commit61a3c78d991c7f5e189e82fa54ddaa9d514544a2 (patch)
tree248b5020362714a0859f24a40d51721f8705eff8 /drivers/acpi/glue.c
parentMerge back ACPI PCI material for v5.16. (diff)
downloadlinux-61a3c78d991c7f5e189e82fa54ddaa9d514544a2.tar.xz
linux-61a3c78d991c7f5e189e82fa54ddaa9d514544a2.zip
ACPI: glue: Use acpi_device_adr() in acpi_find_child_device()
Instead of evaluating _ADR in acpi_find_child_device(), use the observation that it has already been evaluated and the value returned by it has been stored in the pnp.type.bus_address field of the ACPI device object at hand. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/glue.c')
-rw-r--r--drivers/acpi/glue.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/acpi/glue.c b/drivers/acpi/glue.c
index 17ec6e57c4b7..ef104809f27b 100644
--- a/drivers/acpi/glue.c
+++ b/drivers/acpi/glue.c
@@ -113,13 +113,10 @@ struct acpi_device *acpi_find_child_device(struct acpi_device *parent,
return NULL;
list_for_each_entry(adev, &parent->children, node) {
- unsigned long long addr;
- acpi_status status;
+ acpi_bus_address addr = acpi_device_adr(adev);
int score;
- status = acpi_evaluate_integer(adev->handle, METHOD_NAME__ADR,
- NULL, &addr);
- if (ACPI_FAILURE(status) || addr != address)
+ if (!adev->pnp.type.bus_address || addr != address)
continue;
if (!ret) {