diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2015-10-20 19:32:27 +0300 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2015-10-22 01:54:03 +0300 |
commit | 205ad97fc5a6386214323641dd28b822cb6fc624 (patch) | |
tree | e16c2fce56e62fad04e2910d58608ee25a02bde3 /drivers | |
parent | 3f4232ee8b53cf2266d227af299aa511d2d91d11 (diff) | |
download | linux-205ad97fc5a6386214323641dd28b822cb6fc624.tar.xz |
ACPI / property: Fix subnode lookup scope for data-only subnodes
The correct scope for looking up the objects to generate data packages for
data-only subnodes pointed to by another data-only subnode is the scope
of the parent of that subnode and not the scope containing the _DSD object
at the top of the hierarchy (the latter works only if all of the objects
returning data-only subnode packages in a given hierarchy are in the same
scope).
Fix the code to work as expected.
Fixes: 445b0eb058f5 (ACPI / property: Add support for data-only subnodes)
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Tested-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/acpi/property.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/acpi/property.c b/drivers/acpi/property.c index 14654435c295..88f4306744c0 100644 --- a/drivers/acpi/property.c +++ b/drivers/acpi/property.c @@ -71,7 +71,14 @@ static bool acpi_nondev_subnode_ok(acpi_handle scope, if (acpi_extract_properties(buf.pointer, &dn->data)) dn->handle = handle; - if (acpi_enumerate_nondev_subnodes(scope, buf.pointer, &dn->data)) + /* + * The scope for the subnode object lookup is the one of the namespace + * node (device) containing the object that has returned the package. + * That is, it's the scope of that object's parent. + */ + status = acpi_get_parent(handle, &scope); + if (ACPI_SUCCESS(status) + && acpi_enumerate_nondev_subnodes(scope, buf.pointer, &dn->data)) dn->handle = handle; if (dn->handle) { |