diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2015-08-10 12:56:47 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2015-08-25 19:46:39 -0400 |
commit | 4f73b0654d8a954540d49bb0a300f31663423db9 (patch) | |
tree | 84e494fce9c55ad8e09f10b41285649c6c94534d | |
parent | ecc87eed7beeb50c0be0b73322d62135277ea2b0 (diff) |
device property: fallback to pset when gettng one string
The one string as an equivalent to an array of one element. Allow user to read
one string as a plain string.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-rw-r--r-- | drivers/base/property.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/base/property.c b/drivers/base/property.c index 37a7bb7b239d..841b15c5c058 100644 --- a/drivers/base/property.c +++ b/drivers/base/property.c | |||
@@ -462,7 +462,8 @@ int fwnode_property_read_string(struct fwnode_handle *fwnode, | |||
462 | return acpi_dev_prop_read(to_acpi_node(fwnode), propname, | 462 | return acpi_dev_prop_read(to_acpi_node(fwnode), propname, |
463 | DEV_PROP_STRING, val, 1); | 463 | DEV_PROP_STRING, val, 1); |
464 | 464 | ||
465 | return -ENXIO; | 465 | return pset_prop_read_array(to_pset(fwnode), propname, |
466 | DEV_PROP_STRING, val, 1); | ||
466 | } | 467 | } |
467 | EXPORT_SYMBOL_GPL(fwnode_property_read_string); | 468 | EXPORT_SYMBOL_GPL(fwnode_property_read_string); |
468 | 469 | ||