mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH v2 1/2] of: provide for_each_matching_node_from
Date: Mon, 16 Jan 2017 09:04:57 +0100	[thread overview]
Message-ID: <20170116080457.2416-1-u.kleine-koenig@pengutronix.de> (raw)
In-Reply-To: <20170116080126.392-1-u.kleine-koenig@pengutronix.de>

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@pengutronix.de>
---
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@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  parent reply	other threads:[~2017-01-16  8:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-16  8:01 [PATCH 1/2] of: provice for_each_matching_node_from Uwe Kleine-König
2017-01-16  8:01 ` [PATCH 2/2] bus: mvebu-mbus: fixup correct device tree Uwe Kleine-König
2017-01-16  8:04 ` Uwe Kleine-König [this message]
2017-01-17  6:56   ` [PATCH v2 1/2] of: provide for_each_matching_node_from Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170116080457.2416-1-u.kleine-koenig@pengutronix.de \
    --to=u.kleine-koenig@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox