X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=include%2Flinux%2Fof.h;h=72843b72a2b2619a5343be071d1ad104a9cb75af;hb=578f1ef91aa92beb571bfb9af8f4d18f405f3b9e;hp=3ffb6f7fb4d8fb514d0321858f77f7e3c5bae864;hpb=74d8378159de16a0a1d1975d4778120d263d6000;p=karo-tx-linux.git diff --git a/include/linux/of.h b/include/linux/of.h index 3ffb6f7fb4d8..72843b72a2b2 100644 --- a/include/linux/of.h +++ b/include/linux/of.h @@ -190,10 +190,19 @@ extern struct device_node *of_get_parent(const struct device_node *node); extern struct device_node *of_get_next_parent(struct device_node *node); extern struct device_node *of_get_next_child(const struct device_node *node, struct device_node *prev); +extern struct device_node *of_get_next_available_child( + const struct device_node *node, struct device_node *prev); + +extern struct device_node *of_get_child_by_name(const struct device_node *node, + const char *name); #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)) +#define for_each_available_child_of_node(parent, child) \ + for (child = of_get_next_available_child(parent, NULL); child != NULL; \ + child = of_get_next_available_child(parent, child)) + static inline int of_get_child_count(const struct device_node *np) { struct device_node *child;