diff options
Diffstat (limited to 'drivers/usb/musb/da8xx.c')
-rw-r--r-- | drivers/usb/musb/da8xx.c | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/drivers/usb/musb/da8xx.c b/drivers/usb/musb/da8xx.c index e94f556c6aea..67b8ae704e9a 100644 --- a/drivers/usb/musb/da8xx.c +++ b/drivers/usb/musb/da8xx.c | |||
@@ -480,7 +480,6 @@ static int __devinit da8xx_probe(struct platform_device *pdev) | |||
480 | struct clk *clk; | 480 | struct clk *clk; |
481 | 481 | ||
482 | int ret = -ENOMEM; | 482 | int ret = -ENOMEM; |
483 | int musbid; | ||
484 | 483 | ||
485 | glue = kzalloc(sizeof(*glue), GFP_KERNEL); | 484 | glue = kzalloc(sizeof(*glue), GFP_KERNEL); |
486 | if (!glue) { | 485 | if (!glue) { |
@@ -488,18 +487,10 @@ static int __devinit da8xx_probe(struct platform_device *pdev) | |||
488 | goto err0; | 487 | goto err0; |
489 | } | 488 | } |
490 | 489 | ||
491 | /* get the musb id */ | 490 | musb = platform_device_alloc("musb-hdrc", PLATFORM_DEVID_AUTO); |
492 | musbid = musb_get_id(&pdev->dev, GFP_KERNEL); | ||
493 | if (musbid < 0) { | ||
494 | dev_err(&pdev->dev, "failed to allocate musb id\n"); | ||
495 | ret = -ENOMEM; | ||
496 | goto err1; | ||
497 | } | ||
498 | |||
499 | musb = platform_device_alloc("musb-hdrc", musbid); | ||
500 | if (!musb) { | 491 | if (!musb) { |
501 | dev_err(&pdev->dev, "failed to allocate musb device\n"); | 492 | dev_err(&pdev->dev, "failed to allocate musb device\n"); |
502 | goto err2; | 493 | goto err1; |
503 | } | 494 | } |
504 | 495 | ||
505 | clk = clk_get(&pdev->dev, "usb20"); | 496 | clk = clk_get(&pdev->dev, "usb20"); |
@@ -515,7 +506,6 @@ static int __devinit da8xx_probe(struct platform_device *pdev) | |||
515 | goto err4; | 506 | goto err4; |
516 | } | 507 | } |
517 | 508 | ||
518 | musb->id = musbid; | ||
519 | musb->dev.parent = &pdev->dev; | 509 | musb->dev.parent = &pdev->dev; |
520 | musb->dev.dma_mask = &da8xx_dmamask; | 510 | musb->dev.dma_mask = &da8xx_dmamask; |
521 | musb->dev.coherent_dma_mask = da8xx_dmamask; | 511 | musb->dev.coherent_dma_mask = da8xx_dmamask; |
@@ -558,9 +548,6 @@ err4: | |||
558 | err3: | 548 | err3: |
559 | platform_device_put(musb); | 549 | platform_device_put(musb); |
560 | 550 | ||
561 | err2: | ||
562 | musb_put_id(&pdev->dev, musbid); | ||
563 | |||
564 | err1: | 551 | err1: |
565 | kfree(glue); | 552 | kfree(glue); |
566 | 553 | ||
@@ -572,7 +559,6 @@ static int __devexit da8xx_remove(struct platform_device *pdev) | |||
572 | { | 559 | { |
573 | struct da8xx_glue *glue = platform_get_drvdata(pdev); | 560 | struct da8xx_glue *glue = platform_get_drvdata(pdev); |
574 | 561 | ||
575 | musb_put_id(&pdev->dev, glue->musb->id); | ||
576 | platform_device_unregister(glue->musb); | 562 | platform_device_unregister(glue->musb); |
577 | clk_disable(glue->clk); | 563 | clk_disable(glue->clk); |
578 | clk_put(glue->clk); | 564 | clk_put(glue->clk); |