[PATCH 1/1] devicetree: Document of_property_read_string_array() better

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




of_property_read_string_array() is documented to return the number of
strings present in a string array property if its target string buffer is
NULL. What is not documented, however, is that is returned if the buffer
is non-NULL. It returns the number of strings read. Document this.

Signed-off-by: Sakari Ailus <sakari.ailus@xxxxxxxxxxxxxxx>
---
 include/linux/of.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/linux/of.h b/include/linux/of.h
index d72f010..0579156 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -953,6 +953,7 @@ static inline int of_property_count_u64_elems(const struct device_node *np,
  * terminated string values (pointer to data, not a copy) in that property.
  *
  * If @out_strs is NULL, the number of strings in the property is returned.
+ * Otherwise, returns the number of strings read.
  */
 static inline int of_property_read_string_array(const struct device_node *np,
 						const char *propname, const char **out_strs,
-- 
2.7.4

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux