linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 5/5] PPC cleanup: powermac - do use for_each macro
@ 2007-11-29 19:46 Cyrill Gorcunov
  2007-11-29 20:54 ` Benjamin Herrenschmidt
  0 siblings, 1 reply; 2+ messages in thread
From: Cyrill Gorcunov @ 2007-11-29 19:46 UTC (permalink / raw)
  To: PPCML; +Cc: Paul Mackerras, LKML

From: Cyrill Gorcunov <gorcunov@gmail.com>

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
---

 arch/powerpc/platforms/powermac/low_i2c.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/arch/powerpc/platforms/powermac/low_i2c.c b/arch/powerpc/platforms/powermac/low_i2c.c
index da2007e..864fbf4 100644
--- a/arch/powerpc/platforms/powermac/low_i2c.c
+++ b/arch/powerpc/platforms/powermac/low_i2c.c
@@ -585,8 +585,7 @@ static void __init kw_i2c_probe(void)
 	struct device_node *np, *child, *parent;
 
 	/* Probe keywest-i2c busses */
-	for (np = NULL;
-	     (np = of_find_compatible_node(np, "i2c","keywest-i2c")) != NULL;){
+	for_each_compatible_node(np, "i2c","keywest-i2c") {
 		struct pmac_i2c_host_kw *host;
 		int multibus, chans, i;
 
-- 
1.5.3.5

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

* Re: [PATCH 5/5] PPC cleanup: powermac - do use for_each macro
  2007-11-29 19:46 [PATCH 5/5] PPC cleanup: powermac - do use for_each macro Cyrill Gorcunov
@ 2007-11-29 20:54 ` Benjamin Herrenschmidt
  0 siblings, 0 replies; 2+ messages in thread
From: Benjamin Herrenschmidt @ 2007-11-29 20:54 UTC (permalink / raw)
  To: Cyrill Gorcunov; +Cc: PPCML, Paul Mackerras, LKML


On Thu, 2007-11-29 at 22:46 +0300, Cyrill Gorcunov wrote:
> From: Cyrill Gorcunov <gorcunov@gmail.com>
> 
> Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
> ---

Ack.

>  arch/powerpc/platforms/powermac/low_i2c.c |    3 +--
>  1 files changed, 1 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/powerpc/platforms/powermac/low_i2c.c b/arch/powerpc/platforms/powermac/low_i2c.c
> index da2007e..864fbf4 100644
> --- a/arch/powerpc/platforms/powermac/low_i2c.c
> +++ b/arch/powerpc/platforms/powermac/low_i2c.c
> @@ -585,8 +585,7 @@ static void __init kw_i2c_probe(void)
>  	struct device_node *np, *child, *parent;
>  
>  	/* Probe keywest-i2c busses */
> -	for (np = NULL;
> -	     (np = of_find_compatible_node(np, "i2c","keywest-i2c")) != NULL;){
> +	for_each_compatible_node(np, "i2c","keywest-i2c") {
>  		struct pmac_i2c_host_kw *host;
>  		int multibus, chans, i;
>  

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

end of thread, other threads:[~2007-11-29 20:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-29 19:46 [PATCH 5/5] PPC cleanup: powermac - do use for_each macro Cyrill Gorcunov
2007-11-29 20:54 ` Benjamin Herrenschmidt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).