Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1204432

[PATCH v1 2/3] device property: fallback to pset when gettng one string

From Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Newsgroups linux.kernel
Subject [PATCH v1 2/3] device property: fallback to pset when gettng one string
Date 2015-08-10 19:00 +0200
Message-ID <pVYAy-3Ki-7@gated-at.bofh.it> (permalink)
References <pVYAx-3Ki-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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>
---
 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 37a7bb7..841b15c 100644
--- a/drivers/base/property.c
+++ b/drivers/base/property.c
@@ -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);
 
-- 
2.5.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[PATCH v1 2/3] device property: fallback to pset when gettng one string Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2015-08-10 19:00 +0200
  Re: [PATCH v1 2/3] device property: fallback to pset when gettng one  string Mika Westerberg <mika.westerberg@linux.intel.com> - 2015-08-12 14:00 +0200

csiph-web