Skip to contentSkip to conversation

PPC cleanup: powermac - do use for_each macro

PATCH In review Cyrill Gorcunov 2 participants 2 messages Nov 29, 2007

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

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

From: Cyrill Gorcunov <[email protected]>

---

 arch/powerpc/platforms/powermac/low_i2c.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
arch/powerpc/platforms/powermac/low_i2c.c +1 -2
index da2007e..864fbf4 100644
@@ -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;
 
Signature · 1 line
1.5.3.5
#1 lore raw
Quoted 4 lines · Cyrill Gorcunov

From: Cyrill Gorcunov <[email protected]>

---

Ack.

Quoted 17 lines
 arch/powerpc/platforms/powermac/low_i2c.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
arch/powerpc/platforms/powermac/low_i2c.c +1 -2
index da2007e..864fbf4 100644
@@ -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;