Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Irina Tirdea and committed by
Rafael J. Wysocki
bf4703fd 77812034

+1
+1
drivers/acpi/property.c
··· 816 816 next = adev->node.next; 817 817 if (next == head) { 818 818 child = NULL; 819 + adev = ACPI_COMPANION(dev); 819 820 goto nondev; 820 821 } 821 822 adev = list_entry(next, struct acpi_device, node);