@@ -241,7 +241,7 @@ static int __init mv64x60_eth_device_setup(struct device_node *np, int id)
241241
242242 /* only register the shared platform device the first time through */
243243 if (id == 0 && (err = eth_register_shared_pdev (np )))
244- return err ;;
244+ return err ;
245245
246246 memset (r , 0 , sizeof (r ));
247247 of_irq_to_resource (np , 0 , & r [0 ]);
@@ -451,22 +451,19 @@ static int __init mv64x60_device_setup(void)
451451 int id ;
452452 int err ;
453453
454- for ( id = 0 ;
455- (np = of_find_compatible_node ( np , "serial" , "marvell,mpsc" )); id ++ )
456- if ((err = mv64x60_mpsc_device_setup (np , id )))
454+ id = 0 ;
455+ for_each_compatible_node (np , "serial" , "marvell,mpsc" )
456+ if ((err = mv64x60_mpsc_device_setup (np , id ++ )))
457457 goto error ;
458458
459- for (id = 0 ;
460- (np = of_find_compatible_node (np , "network" ,
461- "marvell,mv64x60-eth" ));
462- id ++ )
463- if ((err = mv64x60_eth_device_setup (np , id )))
459+ id = 0 ;
460+ for_each_compatible_node (np , "network" , "marvell,mv64x60-eth" )
461+ if ((err = mv64x60_eth_device_setup (np , id ++ )))
464462 goto error ;
465463
466- for (id = 0 ;
467- (np = of_find_compatible_node (np , "i2c" , "marvell,mv64x60-i2c" ));
468- id ++ )
469- if ((err = mv64x60_i2c_device_setup (np , id )))
464+ id = 0 ;
465+ for_each_compatible_node (np , "i2c" , "marvell,mv64x60-i2c" )
466+ if ((err = mv64x60_i2c_device_setup (np , id ++ )))
470467 goto error ;
471468
472469 /* support up to one watchdog timer */
@@ -477,7 +474,6 @@ static int __init mv64x60_device_setup(void)
477474 of_node_put (np );
478475 }
479476
480-
481477 return 0 ;
482478
483479error :
0 commit comments