diff options
Diffstat (limited to 'arch/powerpc/sysdev/fsl_soc.c')
-rw-r--r-- | arch/powerpc/sysdev/fsl_soc.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/arch/powerpc/sysdev/fsl_soc.c b/arch/powerpc/sysdev/fsl_soc.c index 3ace7474809e..81af4bdf252a 100644 --- a/arch/powerpc/sysdev/fsl_soc.c +++ b/arch/powerpc/sysdev/fsl_soc.c | |||
@@ -390,13 +390,11 @@ static void __init of_register_i2c_devices(struct device_node *adap_node, | |||
390 | static int __init fsl_i2c_of_init(void) | 390 | static int __init fsl_i2c_of_init(void) |
391 | { | 391 | { |
392 | struct device_node *np; | 392 | struct device_node *np; |
393 | unsigned int i; | 393 | unsigned int i = 0; |
394 | struct platform_device *i2c_dev; | 394 | struct platform_device *i2c_dev; |
395 | int ret; | 395 | int ret; |
396 | 396 | ||
397 | for (np = NULL, i = 0; | 397 | for_each_compatible_node(np, NULL, "fsl-i2c") { |
398 | (np = of_find_compatible_node(np, "i2c", "fsl-i2c")) != NULL; | ||
399 | i++) { | ||
400 | struct resource r[2]; | 398 | struct resource r[2]; |
401 | struct fsl_i2c_platform_data i2c_data; | 399 | struct fsl_i2c_platform_data i2c_data; |
402 | const unsigned char *flags = NULL; | 400 | const unsigned char *flags = NULL; |
@@ -432,7 +430,7 @@ static int __init fsl_i2c_of_init(void) | |||
432 | if (ret) | 430 | if (ret) |
433 | goto unreg; | 431 | goto unreg; |
434 | 432 | ||
435 | of_register_i2c_devices(np, i); | 433 | of_register_i2c_devices(np, i++); |
436 | } | 434 | } |
437 | 435 | ||
438 | return 0; | 436 | return 0; |