Skip to content

Commit

Permalink
ACPI / property: fix data node parsing in acpi_get_next_subnode()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Irina Tirdea authored and Rafael J. Wysocki committed Mar 17, 2016
1 parent 7781203 commit bf4703f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/acpi/property.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit bf4703f

Please sign in to comment.