When working with independant trees, one need to find each
compatible node from something else than of_root.
Signed-off-by: Franck Jullien <redacted>
---
include/linux/of.h | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/include/linux/of.h b/include/linux/of.h
index 883df55..37da652 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -891,6 +891,9 @@ static inline int of_property_read_s32(const struct device_node *np,
#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))
+#define for_each_compatible_node_from(from, dn, type, compatible) \
+ for (dn = of_find_compatible_node(from, type, compatible); dn; \
+ dn = of_find_compatible_node(dn, type, compatible))
#define for_each_matching_node(dn, matches) \
for (dn = of_find_matching_node(NULL, matches); dn; \
dn = of_find_matching_node(dn, matches))
--
1.7.1
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html