[POWERPC] Add for_each_child_of_node() helper for iterating over child nodes
[deliverable/linux.git] / include / linux / of.h
index 5c39b9270ff7007b359df90a7cfc407607ddb7ab..c65af7bd1e9c6369757dfaeeecf74feccea83f97 100644 (file)
@@ -46,6 +46,10 @@ extern struct device_node *of_find_node_by_phandle(phandle handle);
 extern struct device_node *of_get_parent(const struct device_node *node);
 extern struct device_node *of_get_next_child(const struct device_node *node,
                                             struct device_node *prev);
+#define for_each_child_of_node(parent, child) \
+       for (child = of_get_next_child(parent, NULL); child != NULL; \
+            child = of_get_next_child(parent, child))
+
 extern struct property *of_find_property(const struct device_node *np,
                                         const char *name,
                                         int *lenp);
This page took 0.025213 seconds and 5 git commands to generate.