diff options
Diffstat (limited to 'arch/powerpc/sysdev')
-rw-r--r-- | arch/powerpc/sysdev/fsl_soc.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/arch/powerpc/sysdev/fsl_soc.c b/arch/powerpc/sysdev/fsl_soc.c index 217bcc2e8f86..f5c240242cfd 100644 --- a/arch/powerpc/sysdev/fsl_soc.c +++ b/arch/powerpc/sysdev/fsl_soc.c | |||
@@ -531,14 +531,12 @@ static enum fsl_usb2_phy_modes determine_usb_phy(const char *phy_type) | |||
531 | static int __init fsl_usb_of_init(void) | 531 | static int __init fsl_usb_of_init(void) |
532 | { | 532 | { |
533 | struct device_node *np; | 533 | struct device_node *np; |
534 | unsigned int i; | 534 | unsigned int i = 0; |
535 | struct platform_device *usb_dev_mph = NULL, *usb_dev_dr_host = NULL, | 535 | struct platform_device *usb_dev_mph = NULL, *usb_dev_dr_host = NULL, |
536 | *usb_dev_dr_client = NULL; | 536 | *usb_dev_dr_client = NULL; |
537 | int ret; | 537 | int ret; |
538 | 538 | ||
539 | for (np = NULL, i = 0; | 539 | for_each_compatible_node(np, NULL, "fsl-usb2-mph") { |
540 | (np = of_find_compatible_node(np, "usb", "fsl-usb2-mph")) != NULL; | ||
541 | i++) { | ||
542 | struct resource r[2]; | 540 | struct resource r[2]; |
543 | struct fsl_usb2_platform_data usb_data; | 541 | struct fsl_usb2_platform_data usb_data; |
544 | const unsigned char *prop = NULL; | 542 | const unsigned char *prop = NULL; |
@@ -581,11 +579,10 @@ static int __init fsl_usb_of_init(void) | |||
581 | fsl_usb2_platform_data)); | 579 | fsl_usb2_platform_data)); |
582 | if (ret) | 580 | if (ret) |
583 | goto unreg_mph; | 581 | goto unreg_mph; |
582 | i++; | ||
584 | } | 583 | } |
585 | 584 | ||
586 | for (np = NULL; | 585 | for_each_compatible_node(np, NULL, "fsl-usb2-dr") { |
587 | (np = of_find_compatible_node(np, "usb", "fsl-usb2-dr")) != NULL; | ||
588 | i++) { | ||
589 | struct resource r[2]; | 586 | struct resource r[2]; |
590 | struct fsl_usb2_platform_data usb_data; | 587 | struct fsl_usb2_platform_data usb_data; |
591 | const unsigned char *prop = NULL; | 588 | const unsigned char *prop = NULL; |
@@ -657,6 +654,7 @@ static int __init fsl_usb_of_init(void) | |||
657 | fsl_usb2_platform_data)))) | 654 | fsl_usb2_platform_data)))) |
658 | goto unreg_dr; | 655 | goto unreg_dr; |
659 | } | 656 | } |
657 | i++; | ||
660 | } | 658 | } |
661 | return 0; | 659 | return 0; |
662 | 660 | ||