Skip to content

Commit 61a3c78

Browse files
committed
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 <[email protected]>
1 parent 87440d7 commit 61a3c78

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

drivers/acpi/glue.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -113,13 +113,10 @@ struct acpi_device *acpi_find_child_device(struct acpi_device *parent,
113113
return NULL;
114114

115115
list_for_each_entry(adev, &parent->children, node) {
116-
unsigned long long addr;
117-
acpi_status status;
116+
acpi_bus_address addr = acpi_device_adr(adev);
118117
int score;
119118

120-
status = acpi_evaluate_integer(adev->handle, METHOD_NAME__ADR,
121-
NULL, &addr);
122-
if (ACPI_FAILURE(status) || addr != address)
119+
if (!adev->pnp.type.bus_address || addr != address)
123120
continue;
124121

125122
if (!ret) {

0 commit comments

Comments
 (0)