···12411241EXPORT_SYMBOL(of_find_all_nodes);1242124212431243/**12441244- * of_get_next_child - Iterate a node childs12451245- * @node: parent node12461246- * @prev: previous child of the parent node, or NULL to get first12471247- *12481248- * Returns a node pointer with refcount incremented, use12491249- * of_node_put() on it when done.12501250- */12511251-struct device_node *of_get_next_child(const struct device_node *node,12521252- struct device_node *prev)12531253-{12541254- struct device_node *next;12551255-12561256- read_lock(&devtree_lock);12571257- next = prev ? prev->sibling : node->child;12581258- for (; next != 0; next = next->sibling)12591259- if (of_node_get(next))12601260- break;12611261- of_node_put(prev);12621262- read_unlock(&devtree_lock);12631263- return next;12641264-}12651265-EXPORT_SYMBOL(of_get_next_child);12661266-12671267-/**12681244 * of_node_get - Increment refcount of a node12691245 * @node: Node to inc refcount, NULL is supported to12701246 * simplify writing of callers
-14
arch/sparc/kernel/prom.c
···29293030extern rwlock_t devtree_lock; /* temporary while merging */31313232-struct device_node *of_get_next_child(const struct device_node *node,3333- struct device_node *prev)3434-{3535- struct device_node *next;3636-3737- next = prev ? prev->sibling : node->child;3838- for (; next != 0; next = next->sibling) {3939- break;4040- }4141-4242- return next;4343-}4444-EXPORT_SYMBOL(of_get_next_child);4545-4632struct device_node *of_find_node_by_path(const char *path)4733{4834 struct device_node *np = allnodes;
-14
arch/sparc64/kernel/prom.c
···34343535extern rwlock_t devtree_lock; /* temporary while merging */36363737-struct device_node *of_get_next_child(const struct device_node *node,3838- struct device_node *prev)3939-{4040- struct device_node *next;4141-4242- next = prev ? prev->sibling : node->child;4343- for (; next != 0; next = next->sibling) {4444- break;4545- }4646-4747- return next;4848-}4949-EXPORT_SYMBOL(of_get_next_child);5050-5137struct device_node *of_find_node_by_path(const char *path)5238{5339 struct device_node *np = allnodes;
+24
drivers/of/base.c
···134134 return np;135135}136136EXPORT_SYMBOL(of_get_parent);137137+138138+/**139139+ * of_get_next_child - Iterate a node childs140140+ * @node: parent node141141+ * @prev: previous child of the parent node, or NULL to get first142142+ *143143+ * Returns a node pointer with refcount incremented, use144144+ * of_node_put() on it when done.145145+ */146146+struct device_node *of_get_next_child(const struct device_node *node,147147+ struct device_node *prev)148148+{149149+ struct device_node *next;150150+151151+ read_lock(&devtree_lock);152152+ next = prev ? prev->sibling : node->child;153153+ for (; next; next = next->sibling)154154+ if (of_node_get(next))155155+ break;156156+ of_node_put(prev);157157+ read_unlock(&devtree_lock);158158+ return next;159159+}160160+EXPORT_SYMBOL(of_get_next_child);