Skip to content

Commit

Permalink
of: base: improve of_get_next_child() kernel-doc
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Baruch Siach authored and Rob Herring committed Apr 17, 2015
1 parent 4155fc0 commit 6480827
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/of/base.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 6480827

Please sign in to comment.