[linux-yocto] [PATCH 10/11] device property: fallback to pset when gettng one string

weifeng.voon at intel.com weifeng.voon at intel.com
Sun Mar 20 18:57:00 PDT 2016


From: Andy Shevchenko <andriy.shevchenko at linux.intel.com>

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 at linux.intel.com>
Reviewed-by: Mika Westerberg <mika.westerberg at linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki at intel.com>
(cherry picked from commit 4f73b0654d8a954540d49bb0a300f31663423db9)
Signed-off-by: Voon, Weifeng <weifeng.voon at intel.com>
---
 drivers/base/property.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/base/property.c b/drivers/base/property.c
index dce2331..e5b4385 100644
--- a/drivers/base/property.c
+++ b/drivers/base/property.c
@@ -470,7 +470,8 @@ int fwnode_property_read_string(struct fwnode_handle *fwnode,
 		return acpi_node_prop_read(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);
 
-- 
1.9.1



More information about the linux-yocto mailing list