diff options
| -rw-r--r-- | drivers/acpi/property.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/acpi/property.c b/drivers/acpi/property.c index 8832d0e13a72..9d460a859be0 100644 --- a/drivers/acpi/property.c +++ b/drivers/acpi/property.c | |||
| @@ -1032,6 +1032,14 @@ struct fwnode_handle *acpi_get_next_subnode(const struct fwnode_handle *fwnode, | |||
| 1032 | const struct acpi_data_node *data = to_acpi_data_node(fwnode); | 1032 | const struct acpi_data_node *data = to_acpi_data_node(fwnode); |
| 1033 | struct acpi_data_node *dn; | 1033 | struct acpi_data_node *dn; |
| 1034 | 1034 | ||
| 1035 | /* | ||
| 1036 | * We can have a combination of device and data nodes, e.g. with | ||
| 1037 | * hierarchical _DSD properties. Make sure the adev pointer is | ||
| 1038 | * restored before going through data nodes, otherwise we will | ||
| 1039 | * be looking for data_nodes below the last device found instead | ||
| 1040 | * of the common fwnode shared by device_nodes and data_nodes. | ||
| 1041 | */ | ||
| 1042 | adev = to_acpi_device_node(fwnode); | ||
| 1035 | if (adev) | 1043 | if (adev) |
| 1036 | head = &adev->data.subnodes; | 1044 | head = &adev->data.subnodes; |
| 1037 | else if (data) | 1045 | else if (data) |
