mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] driver core: property: Update fwnode_property_read_string_array()
@ 2015-03-24  0:40 Rafael J. Wysocki
  2015-03-25  8:29 ` Greg Kroah-Hartman
  0 siblings, 1 reply; 2+ messages in thread
From: Rafael J. Wysocki @ 2015-03-24  0:40 UTC (permalink / raw)
  To: Linux Kernel Mailing List
  Cc: ACPI Devel Maling List, Greg Kroah-Hartman, Heikki Krogerus,
	Mika Westerberg

From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

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>
---
 drivers/base/property.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Index: linux-pm/drivers/base/property.c
===================================================================
--- linux-pm.orig/drivers/base/property.c
+++ linux-pm/drivers/base/property.c
@@ -347,8 +347,10 @@ int fwnode_property_read_string_array(st
 				      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);


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-03-25  8:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-24  0:40 [PATCH] driver core: property: Update fwnode_property_read_string_array() Rafael J. Wysocki
2015-03-25  8:29 ` Greg Kroah-Hartman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®