From: Baruch Siach <baruch@tkos.co.il>
Date: Thu, 19 Mar 2015 12:03:41 +0000 (+0200)
Subject: of: base: improve of_get_next_child() kernel-doc
X-Git-Tag: firefly_0821_release~176^2~1868^2~3
X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=6480827357923b3977b97c9413a7307be850975d;p=firefly-linux-kernel-4.4.55.git

of: base: improve of_get_next_child() kernel-doc

Add two new facts to of_get_next_child() documentation:

   * of_get_next_child() returns NULL when there is not next child

   * of_get_next_child() decrements the refcount of prev

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Rob Herring <robh@kernel.org>
---

diff --git a/drivers/of/base.c b/drivers/of/base.c
index 31ca3c8dae61..7183e825d658 100644
--- a/drivers/of/base.c
+++ b/drivers/of/base.c
@@ -663,8 +663,9 @@ static struct device_node *__of_get_next_child(const struct device_node *node,
  *	@node:	parent node
  *	@prev:	previous child of the parent node, or NULL to get first
  *
- *	Returns a node pointer with refcount incremented, use
- *	of_node_put() on it when done.
+ *	Returns a node pointer with refcount incremented, use of_node_put() on
+ *	it when done. Returns NULL when prev is the last child. Decrements the
+ *	refcount of prev.
  */
 struct device_node *of_get_next_child(const struct device_node *node,
 	struct device_node *prev)