summaryrefslogtreecommitdiffstats
path: root/drivers/acpi/property.c
diff options
context:
space:
mode:
authorIrina Tirdea <irina.tirdea@intel.com>2016-03-13 02:33:30 +0200
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2016-03-17 03:06:38 +0100
commitbf4703fdd166fffd5b2e4c42d2ebbf708b94748e (patch)
tree41d4306b747a7b61695536f91bfa5a0a37110d9a /drivers/acpi/property.c
parent7781203416ffc4e731619f8a8b93a37599a8f502 (diff)
downloadop-kernel-dev-bf4703fdd166fffd5b2e4c42d2ebbf708b94748e.zip
op-kernel-dev-bf4703fdd166fffd5b2e4c42d2ebbf708b94748e.tar.gz
ACPI / property: fix data node parsing in acpi_get_next_subnode()
When an ACPI node has both ACPI device nodes and ACPI data nodes, acpi_get_next_subnode() will return the ACPI data nodes of its last parsed child. To avoid that, make acpi_get_next_subnode() go back to the original ACPI device object when all of the device node children of it have been found already. Signed-off-by: Irina Tirdea <irina.tirdea@intel.com> [ rjw: Changelog ] Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/property.c')
-rw-r--r--drivers/acpi/property.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/acpi/property.c b/drivers/acpi/property.c
index 2aee416..f2fd3fe 100644
--- a/drivers/acpi/property.c
+++ b/drivers/acpi/property.c
@@ -816,6 +816,7 @@ struct fwnode_handle *acpi_get_next_subnode(struct device *dev,
next = adev->node.next;
if (next == head) {
child = NULL;
+ adev = ACPI_COMPANION(dev);
goto nondev;
}
adev = list_entry(next, struct acpi_device, node);
OpenPOWER on IntegriCloud