summaryrefslogtreecommitdiff
path: root/drivers/acpi/property.c
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2015-08-27 04:37:19 +0200
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2015-09-15 01:47:34 +0200
commit263b4c1a64bc12470684aeaf7c44f03d31716819 (patch)
tree80442913eae7918339e5f2ee2629317795b5e4b7 /drivers/acpi/property.c
parent445b0eb058f5f31c844a731cb82e7441d0d9e578 (diff)
ACPI / property: Expose data-only subnodes via sysfs
Add infrastructure needed to expose data-only subnodes of ACPI device objects introduced previously via sysfs. Each data-only subnode is represented as a sysfs directory under the directory corresponding to its parent object (a device or a data-only subnode). Each of them has a "path" attribute (containing the full ACPI namespace path to the object the subnode data come from) at this time. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Tested-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Diffstat (limited to 'drivers/acpi/property.c')
-rw-r--r--drivers/acpi/property.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/acpi/property.c b/drivers/acpi/property.c
index 17c436de376b..333f9146d19e 100644
--- a/drivers/acpi/property.c
+++ b/drivers/acpi/property.c
@@ -64,12 +64,13 @@ static bool acpi_nondev_subnode_ok(acpi_handle scope,
goto fail;
if (acpi_extract_properties(buf.pointer, &dn->data))
- dn->data.pointer = buf.pointer;
+ dn->handle = handle;
if (acpi_enumerate_nondev_subnodes(scope, buf.pointer, &dn->data))
- dn->data.pointer = buf.pointer;
+ dn->handle = handle;
- if (dn->data.pointer) {
+ if (dn->handle) {
+ dn->data.pointer = buf.pointer;
list_add_tail(&dn->sibling, list);
return true;
}
@@ -302,6 +303,7 @@ static void acpi_destroy_nondev_subnodes(struct list_head *list)
list_for_each_entry_safe_reverse(dn, next, list, sibling) {
acpi_destroy_nondev_subnodes(&dn->data.subnodes);
+ wait_for_completion(&dn->kobj_done);
list_del(&dn->sibling);
ACPI_FREE((void *)dn->data.pointer);
kfree(dn);