Added for_each_node_by_name_from() to be able to
pass external root node.

Signed-off-by: Teresa Gámez <t.ga...@phytec.de>
---
 include/of.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/include/of.h b/include/of.h
index e6993fd..cd2bfe0 100644
--- a/include/of.h
+++ b/include/of.h
@@ -568,6 +568,9 @@ static inline struct device_d 
*of_find_device_by_node(struct device_node *np)
 #define for_each_node_by_name(dn, name) \
        for (dn = of_find_node_by_name(NULL, name); dn; \
             dn = of_find_node_by_name(dn, name))
+#define for_each_node_by_name_from(dn, root, name) \
+       for (dn = of_find_node_by_name(root, name); dn; \
+            dn = of_find_node_by_name(dn, name))
 #define for_each_compatible_node(dn, type, compatible) \
        for (dn = of_find_compatible_node(NULL, type, compatible); dn; \
             dn = of_find_compatible_node(dn, type, compatible))
-- 
1.9.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

Reply via email to