aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/sysdev/mv64x60_dev.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/sysdev/mv64x60_dev.c')
-rw-r--r--arch/powerpc/sysdev/mv64x60_dev.c24
1 files changed, 10 insertions, 14 deletions
diff --git a/arch/powerpc/sysdev/mv64x60_dev.c b/arch/powerpc/sysdev/mv64x60_dev.c
index 4316f5a48a0f..efda0028909d 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)
241 241
242 /* only register the shared platform device the first time through */ 242 /* only register the shared platform device the first time through */
243 if (id == 0 && (err = eth_register_shared_pdev(np))) 243 if (id == 0 && (err = eth_register_shared_pdev(np)))
244 return err;; 244 return err;
245 245
246 memset(r, 0, sizeof(r)); 246 memset(r, 0, sizeof(r));
247 of_irq_to_resource(np, 0, &r[0]); 247 of_irq_to_resource(np, 0, &r[0]);
@@ -445,22 +445,19 @@ static int __init mv64x60_device_setup(void)
445 int id; 445 int id;
446 int err; 446 int err;
447 447
448 for (id = 0; 448 id = 0;
449 (np = of_find_compatible_node(np, "serial", "marvell,mpsc")); id++) 449 for_each_compatible_node(np, "serial", "marvell,mpsc")
450 if ((err = mv64x60_mpsc_device_setup(np, id))) 450 if ((err = mv64x60_mpsc_device_setup(np, id++)))
451 goto error; 451 goto error;
452 452
453 for (id = 0; 453 id = 0;
454 (np = of_find_compatible_node(np, "network", 454 for_each_compatible_node(np, "network", "marvell,mv64x60-eth")
455 "marvell,mv64x60-eth")); 455 if ((err = mv64x60_eth_device_setup(np, id++)))
456 id++)
457 if ((err = mv64x60_eth_device_setup(np, id)))
458 goto error; 456 goto error;
459 457
460 for (id = 0; 458 id = 0;
461 (np = of_find_compatible_node(np, "i2c", "marvell,mv64x60-i2c")); 459 for_each_compatible_node(np, "i2c", "marvell,mv64x60-i2c")
462 id++) 460 if ((err = mv64x60_i2c_device_setup(np, id++)))
463 if ((err = mv64x60_i2c_device_setup(np, id)))
464 goto error; 461 goto error;
465 462
466 /* support up to one watchdog timer */ 463 /* support up to one watchdog timer */
@@ -471,7 +468,6 @@ static int __init mv64x60_device_setup(void)
471 of_node_put(np); 468 of_node_put(np);
472 } 469 }
473 470
474
475 return 0; 471 return 0;
476 472
477error: 473error: