]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
device property: fallback to pset when gettng one string
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Mon, 10 Aug 2015 16:56:47 +0000 (19:56 +0300)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 25 Aug 2015 23:46:39 +0000 (01:46 +0200)
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>
drivers/base/property.c

index 37a7bb7b239d06fbe285c553dbe470375e4ad877..841b15c5c058e9ec00d82bb203056bacc3f2d86e 100644 (file)
@@ -462,7 +462,8 @@ int fwnode_property_read_string(struct fwnode_handle *fwnode,
                return acpi_dev_prop_read(to_acpi_node(fwnode), propname,
                                          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);