Commit 4f73b065 authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Rafael J. Wysocki

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: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: default avatarMika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent ecc87eed
...@@ -462,7 +462,8 @@ int fwnode_property_read_string(struct fwnode_handle *fwnode, ...@@ -462,7 +462,8 @@ int fwnode_property_read_string(struct fwnode_handle *fwnode,
return acpi_dev_prop_read(to_acpi_node(fwnode), propname, return acpi_dev_prop_read(to_acpi_node(fwnode), propname,
DEV_PROP_STRING, val, 1); DEV_PROP_STRING, val, 1);
return -ENXIO; return pset_prop_read_array(to_pset(fwnode), propname,
DEV_PROP_STRING, val, 1);
} }
EXPORT_SYMBOL_GPL(fwnode_property_read_string); EXPORT_SYMBOL_GPL(fwnode_property_read_string);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment