[PATCH 5/5] PPC cleanup: powermac - do use for_each macro

Subsystems: linux for power macintosh, linux for powerpc (32-bit and 64-bit), the rest

STALE6864d

2 messages, 2 authors, 2007-11-29 · open the first message on its own page

[PATCH 5/5] PPC cleanup: powermac - do use for_each macro

From: Cyrill Gorcunov <hidden>
Date: 2007-11-29 19:47:48

From: Cyrill Gorcunov <redacted>

Signed-off-by: Cyrill Gorcunov <redacted>
---

 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

Re: [PATCH 5/5] PPC cleanup: powermac - do use for_each macro

From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Date: 2007-11-29 20:55:26

On Thu, 2007-11-29 at 22:46 +0300, Cyrill Gorcunov wrote:
From: Cyrill Gorcunov <redacted>

Signed-off-by: Cyrill Gorcunov <redacted>
---
Ack.
quoted hunk
 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;
 
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help