mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 1/2] of: provice for_each_matching_node_from
@ 2017-01-16  8:01 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 ` [PATCH v2 1/2] of: provide for_each_matching_node_from Uwe Kleine-König
  0 siblings, 2 replies; 4+ messages in thread
From: Uwe Kleine-König @ 2017-01-16  8:01 UTC (permalink / raw)
  To: barebox

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>
---
 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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 2/2] bus: mvebu-mbus: fixup correct device tree
  2017-01-16  8:01 [PATCH 1/2] of: provice for_each_matching_node_from Uwe Kleine-König
@ 2017-01-16  8:01 ` Uwe Kleine-König
  2017-01-16  8:04 ` [PATCH v2 1/2] of: provide for_each_matching_node_from Uwe Kleine-König
  1 sibling, 0 replies; 4+ messages in thread
From: Uwe Kleine-König @ 2017-01-16  8:01 UTC (permalink / raw)
  To: barebox

When booting with an external device tree this external tree must
be adapted, not the internal tree again.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/bus/mvebu-mbus.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/bus/mvebu-mbus.c b/drivers/bus/mvebu-mbus.c
index 735fa323c458..df5f7a32d346 100644
--- a/drivers/bus/mvebu-mbus.c
+++ b/drivers/bus/mvebu-mbus.c
@@ -754,7 +754,7 @@ static int mvebu_mbus_of_fixup(struct device_node *root, void *context)
 {
 	struct device_node *np;
 
-	for_each_matching_node(np, mvebu_mbus_dt_ids) {
+	for_each_matching_node_from(np, root, mvebu_mbus_dt_ids) {
 		struct property *p;
 		int n, pa, na, ns, lenp, size;
 		u32 *ranges;
-- 
2.11.0


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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH v2 1/2] of: provide for_each_matching_node_from
  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
  2017-01-17  6:56   ` Sascha Hauer
  1 sibling, 1 reply; 4+ messages in thread
From: Uwe Kleine-König @ 2017-01-16  8:04 UTC (permalink / raw)
  To: barebox

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2 1/2] of: provide for_each_matching_node_from
  2017-01-16  8:04 ` [PATCH v2 1/2] of: provide for_each_matching_node_from Uwe Kleine-König
@ 2017-01-17  6:56   ` Sascha Hauer
  0 siblings, 0 replies; 4+ messages in thread
From: Sascha Hauer @ 2017-01-17  6:56 UTC (permalink / raw)
  To: Uwe Kleine-König; +Cc: barebox

On Mon, Jan 16, 2017 at 09:04:57AM +0100, Uwe Kleine-König wrote:
> 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(-)

Applied, thanks

Sascha

> 
> 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

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-01-17  6:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 ` [PATCH v2 1/2] of: provide for_each_matching_node_from Uwe Kleine-König
2017-01-17  6:56   ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox