diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2016-11-22 00:02:19 +0100 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2016-11-24 02:43:47 +0100 |
commit | 99db5ff7fe0b4e1657423d7bbe2aa8f655dd02d1 (patch) | |
tree | 16f7b7203b451a951fb9bd1d0a0e29edebf7122c /drivers/acpi/device_sysfs.c | |
parent | 9c763584b7c8911106bb77af7e648bef09af9d80 (diff) |
ACPI / property: Hierarchical properties support update
The definition document of the Hierarchical Properties Extension UUID
for _DSD has been changed recently to allow local references to be
used as sub-node link targets (previously, it only allowed strings to
be used for that purpose).
Update the code in drivers/acpi/property.c to reflect that change.
Link: http://www.uefi.org/sites/default/files/resources/_DSD-hierarchical-data-extension-UUID-v1.1.pdf
Tested-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/device_sysfs.c')
-rw-r--r-- | drivers/acpi/device_sysfs.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/acpi/device_sysfs.c b/drivers/acpi/device_sysfs.c index 7b2c48fde4e2..24418932612e 100644 --- a/drivers/acpi/device_sysfs.c +++ b/drivers/acpi/device_sysfs.c @@ -52,7 +52,7 @@ struct acpi_data_node_attr { static ssize_t data_node_show_path(struct acpi_data_node *dn, char *buf) { - return acpi_object_path(dn->handle, buf); + return dn->handle ? acpi_object_path(dn->handle, buf) : 0; } DATA_NODE_ATTR(path); @@ -105,10 +105,10 @@ static void acpi_expose_nondev_subnodes(struct kobject *kobj, init_completion(&dn->kobj_done); ret = kobject_init_and_add(&dn->kobj, &acpi_data_node_ktype, kobj, "%s", dn->name); - if (ret) - acpi_handle_err(dn->handle, "Failed to expose (%d)\n", ret); - else + if (!ret) acpi_expose_nondev_subnodes(&dn->kobj, &dn->data); + else if (dn->handle) + acpi_handle_err(dn->handle, "Failed to expose (%d)\n", ret); } } |