[PATCH 5/5] PPC cleanup: powermac - do use for_each macro
Cyrill Gorcunov
gorcunov at gmail.com
Fri Nov 30 06:46:54 EST 2007
From: Cyrill Gorcunov <gorcunov at gmail.com>
Signed-off-by: Cyrill Gorcunov <gorcunov at 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
More information about the Linuxppc-dev
mailing list