summaryrefslogtreecommitdiff
path: root/drivers/base
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2015-03-24 00:18:05 +0100
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2015-03-25 20:59:09 +0100
commitf42712a92e660fbee2193c5dde672470d099f63f (patch)
tree67c1ec0da6d7b0757c70c3dc6cd595c8520924bb /drivers/base
parent5c0acf3b4f96abbd1fad40af7fdf0ed94cf523b7 (diff)
downloadlinux-f42712a92e660fbee2193c5dde672470d099f63f.tar.gz
linux-f42712a92e660fbee2193c5dde672470d099f63f.tar.xz
driver core: property: Update fwnode_property_read_string_array()
Commit 5c0acf3b4f96 (driver core: Add comments about returning array counts) forgot to update fwnode_property_read_string_array() along the lines of device_property_read_string_array(), although it did change the kerneldoc comment of it. Fix that. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/base')
-rw-r--r--drivers/base/property.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/base/property.c b/drivers/base/property.c
index b524a4e42a83..cf3b2160e34e 100644
--- a/drivers/base/property.c
+++ b/drivers/base/property.c
@@ -347,8 +347,10 @@ int fwnode_property_read_string_array(struct fwnode_handle *fwnode,
size_t nval)
{
if (is_of_node(fwnode))
- return of_property_read_string_array(of_node(fwnode), propname,
- val, nval);
+ return val ?
+ of_property_read_string_array(of_node(fwnode), propname,
+ val, nval) :
+ of_property_count_strings(of_node(fwnode), propname);
else if (is_acpi_node(fwnode))
return acpi_dev_prop_read(acpi_node(fwnode), propname,
DEV_PROP_STRING, val, nval);