[PATCH v2 1/2] of: provide for_each_matching_node_from

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is for_each_matching_node for a given root similar to the other
..._from functions.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxxxx>
---
Changes since v1:
 - fix typo in Subject

 include/of.h | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/include/of.h b/include/of.h
index ed6e87047350..e3bb452b86fa 100644
--- a/include/of.h
+++ b/include/of.h
@@ -665,9 +665,11 @@ static inline struct device_node *of_find_matching_node(
 {
 	return of_find_matching_node_and_match(from, matches, NULL);
 }
-#define for_each_matching_node(dn, matches) \
-	for (dn = of_find_matching_node(NULL, matches); dn; \
+#define for_each_matching_node_from(dn, root, matches) \
+	for (dn = of_find_matching_node(root, matches); dn; \
 	     dn = of_find_matching_node(dn, matches))
+#define for_each_matching_node(dn, matches) \
+	for_each_matching_node_from(dn, NULL, matches)
 #define for_each_matching_node_and_match(dn, matches, match) \
 	for (dn = of_find_matching_node_and_match(NULL, matches, match); \
 	     dn; dn = of_find_matching_node_and_match(dn, matches, match))
-- 
2.11.0


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




[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux