diff options
author | Cyrill Gorcunov <gorcunov@gmail.com> | 2007-11-30 06:44:36 +1100 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2008-01-17 14:56:54 +1100 |
commit | 26cb7d8bbddc8338904b8810b860ccf052c761fa (patch) | |
tree | 24a183faa00bcee80453ca1fa65f414ddea8d141 /arch/powerpc/sysdev/mv64x60_dev.c | |
parent | 283029d16a882539ab0027afd94ac52858d050b2 (diff) | |
download | blackbird-op-linux-26cb7d8bbddc8338904b8810b860ccf052c761fa.tar.gz blackbird-op-linux-26cb7d8bbddc8338904b8810b860ccf052c761fa.zip |
[POWERPC] Use for_each macros in arch/powerpc/sysdev
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/sysdev/mv64x60_dev.c')
-rw-r--r-- | arch/powerpc/sysdev/mv64x60_dev.c | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/arch/powerpc/sysdev/mv64x60_dev.c b/arch/powerpc/sysdev/mv64x60_dev.c index 548a32082e4a..304056cafb1e 100644 --- a/arch/powerpc/sysdev/mv64x60_dev.c +++ b/arch/powerpc/sysdev/mv64x60_dev.c @@ -241,7 +241,7 @@ static int __init mv64x60_eth_device_setup(struct device_node *np, int id) /* only register the shared platform device the first time through */ if (id == 0 && (err = eth_register_shared_pdev(np))) - return err;; + return err; memset(r, 0, sizeof(r)); of_irq_to_resource(np, 0, &r[0]); @@ -451,22 +451,19 @@ static int __init mv64x60_device_setup(void) int id; int err; - for (id = 0; - (np = of_find_compatible_node(np, "serial", "marvell,mpsc")); id++) - if ((err = mv64x60_mpsc_device_setup(np, id))) + id = 0; + for_each_compatible_node(np, "serial", "marvell,mpsc") + if ((err = mv64x60_mpsc_device_setup(np, id++))) goto error; - for (id = 0; - (np = of_find_compatible_node(np, "network", - "marvell,mv64x60-eth")); - id++) - if ((err = mv64x60_eth_device_setup(np, id))) + id = 0; + for_each_compatible_node(np, "network", "marvell,mv64x60-eth") + if ((err = mv64x60_eth_device_setup(np, id++))) goto error; - for (id = 0; - (np = of_find_compatible_node(np, "i2c", "marvell,mv64x60-i2c")); - id++) - if ((err = mv64x60_i2c_device_setup(np, id))) + id = 0; + for_each_compatible_node(np, "i2c", "marvell,mv64x60-i2c") + if ((err = mv64x60_i2c_device_setup(np, id++))) goto error; /* support up to one watchdog timer */ @@ -477,7 +474,6 @@ static int __init mv64x60_device_setup(void) of_node_put(np); } - return 0; error: |