summaryrefslogtreecommitdiffstats
path: root/drivers/acpi
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2019-05-06 19:45:37 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2019-05-06 19:45:37 -0700
commit4dd2ab9a0f84a446c65ff33c95339f1cd0e21a4b (patch)
tree059c66f35ef52f850c3e2425a0d478561b0fdf70 /drivers/acpi
parent8f5e823f9131a430b12f73e9436d7486e20c16f5 (diff)
parent23583f7795025e3c783b680d906509366b0906ad (diff)
downloadlinux-4dd2ab9a0f84a446c65ff33c95339f1cd0e21a4b.tar.gz
linux-4dd2ab9a0f84a446c65ff33c95339f1cd0e21a4b.tar.bz2
linux-4dd2ab9a0f84a446c65ff33c95339f1cd0e21a4b.zip
Merge tag 'devprop-5.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Pull device properties framework updates from Rafael Wysocki: "These fix the handling of data nodes in the ACPI properties support code, add a new helper for endpoint lookup in property graphs and restore a comment inadvertently removed by one of previous changes. Specifics: - Fix the handling of data nodes in the ACPI properties support code for devices with child devices and hierarchical _DSD properties (Pierre-Louis Bossart). - Add fwnode_graph_get_endpoint_by_id() helper for endpoint lookup in device property graphs (Sakari Ailus). - Restore the _DSD data subnodes GUID comment inadvertently removed by one of previous changes (Shunyong Yang)" * tag 'devprop-5.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: ACPI / property: fix handling of data_nodes in acpi_get_next_subnode() device property: Add fwnode_graph_get_endpoint_by_id() ACPI: property: restore _DSD data subnodes GUID comment
Diffstat (limited to 'drivers/acpi')
-rw-r--r--drivers/acpi/property.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/acpi/property.c b/drivers/acpi/property.c
index 77abe0ec4043..9d460a859be0 100644
--- a/drivers/acpi/property.c
+++ b/drivers/acpi/property.c
@@ -44,6 +44,7 @@ static const guid_t prp_guids[] = {
0xbf, 0xf0, 0x76, 0x14, 0x38, 0x07, 0xc3, 0x89),
};
+/* ACPI _DSD data subnodes GUID: dbb8e3e6-5886-4ba6-8795-1319f52a966b */
static const guid_t ads_guid =
GUID_INIT(0xdbb8e3e6, 0x5886, 0x4ba6,
0x87, 0x95, 0x13, 0x19, 0xf5, 0x2a, 0x96, 0x6b);
@@ -1031,6 +1032,14 @@ struct fwnode_handle *acpi_get_next_subnode(const struct fwnode_handle *fwnode,
const struct acpi_data_node *data = to_acpi_data_node(fwnode);
struct acpi_data_node *dn;
+ /*
+ * We can have a combination of device and data nodes, e.g. with
+ * hierarchical _DSD properties. Make sure the adev pointer is
+ * restored before going through data nodes, otherwise we will
+ * be looking for data_nodes below the last device found instead
+ * of the common fwnode shared by device_nodes and data_nodes.
+ */
+ adev = to_acpi_device_node(fwnode);
if (adev)
head = &adev->data.subnodes;
else if (data)