aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/musb/musb_dsps.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/musb/musb_dsps.c')
-rw-r--r--drivers/usb/musb/musb_dsps.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/drivers/usb/musb/musb_dsps.c b/drivers/usb/musb/musb_dsps.c
index 217808d9fbe1..494772fc9e23 100644
--- a/drivers/usb/musb/musb_dsps.c
+++ b/drivers/usb/musb/musb_dsps.c
@@ -479,9 +479,9 @@ static int __devinit dsps_create_musb_pdev(struct dsps_glue *glue, u8 id)
479 ret = -ENODEV; 479 ret = -ENODEV;
480 goto err0; 480 goto err0;
481 } 481 }
482 strcpy((u8 *)res->name, "mc");
483 res->parent = NULL; 482 res->parent = NULL;
484 resources[1] = *res; 483 resources[1] = *res;
484 resources[1].name = "mc";
485 485
486 /* allocate the child platform device */ 486 /* allocate the child platform device */
487 musb = platform_device_alloc("musb-hdrc", -1); 487 musb = platform_device_alloc("musb-hdrc", -1);
@@ -566,27 +566,28 @@ static int __devinit dsps_probe(struct platform_device *pdev)
566 } 566 }
567 platform_set_drvdata(pdev, glue); 567 platform_set_drvdata(pdev, glue);
568 568
569 /* create the child platform device for first instances of musb */
570 ret = dsps_create_musb_pdev(glue, 0);
571 if (ret != 0) {
572 dev_err(&pdev->dev, "failed to create child pdev\n");
573 goto err2;
574 }
575
576 /* enable the usbss clocks */ 569 /* enable the usbss clocks */
577 pm_runtime_enable(&pdev->dev); 570 pm_runtime_enable(&pdev->dev);
578 571
579 ret = pm_runtime_get_sync(&pdev->dev); 572 ret = pm_runtime_get_sync(&pdev->dev);
580 if (ret < 0) { 573 if (ret < 0) {
581 dev_err(&pdev->dev, "pm_runtime_get_sync FAILED"); 574 dev_err(&pdev->dev, "pm_runtime_get_sync FAILED");
575 goto err2;
576 }
577
578 /* create the child platform device for first instances of musb */
579 ret = dsps_create_musb_pdev(glue, 0);
580 if (ret != 0) {
581 dev_err(&pdev->dev, "failed to create child pdev\n");
582 goto err3; 582 goto err3;
583 } 583 }
584 584
585 return 0; 585 return 0;
586 586
587err3: 587err3:
588 pm_runtime_disable(&pdev->dev); 588 pm_runtime_put(&pdev->dev);
589err2: 589err2:
590 pm_runtime_disable(&pdev->dev);
590 kfree(glue->wrp); 591 kfree(glue->wrp);
591err1: 592err1:
592 kfree(glue); 593 kfree(glue);