From: Irina Tirdea Date: Sun, 13 Mar 2016 00:33:30 +0000 (+0200) Subject: ACPI / property: fix data node parsing in acpi_get_next_subnode() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=bf4703fdd166fffd5b2e4c42d2ebbf708b94748e;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 [ rjw: Changelog ] Signed-off-by: Rafael J. Wysocki --- diff --git a/drivers/acpi/property.c b/drivers/acpi/property.c index 2aee41655ce9..f2fd3fee588a 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);