]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - arch/powerpc/kernel/prom.c
Consolidate of_get_next_child
[karo-tx-linux.git] / arch / powerpc / kernel / prom.c
index 1ad56d3c6061cd18353c94b73358411d2956fb18..5fa221ce87148ae385b3787b0fc076d998eafe6d 100644 (file)
@@ -1240,30 +1240,6 @@ struct device_node *of_find_all_nodes(struct device_node *prev)
 }
 EXPORT_SYMBOL(of_find_all_nodes);
 
-/**
- *     of_get_next_child - Iterate a node childs
- *     @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.
- */
-struct device_node *of_get_next_child(const struct device_node *node,
-       struct device_node *prev)
-{
-       struct device_node *next;
-
-       read_lock(&devtree_lock);
-       next = prev ? prev->sibling : node->child;
-       for (; next != 0; next = next->sibling)
-               if (of_node_get(next))
-                       break;
-       of_node_put(prev);
-       read_unlock(&devtree_lock);
-       return next;
-}
-EXPORT_SYMBOL(of_get_next_child);
-
 /**
  *     of_node_get - Increment refcount of a node
  *     @node:  Node to inc refcount, NULL is supported to