diff options
Diffstat (limited to 'drivers/usb/musb/am35x.c')
-rw-r--r-- | drivers/usb/musb/am35x.c | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/drivers/usb/musb/am35x.c b/drivers/usb/musb/am35x.c index fdfd779c35b3..3ff30b9a5894 100644 --- a/drivers/usb/musb/am35x.c +++ b/drivers/usb/musb/am35x.c | |||
@@ -459,7 +459,6 @@ static int __devinit am35x_probe(struct platform_device *pdev) | |||
459 | struct clk *clk; | 459 | struct clk *clk; |
460 | 460 | ||
461 | int ret = -ENOMEM; | 461 | int ret = -ENOMEM; |
462 | int musbid; | ||
463 | 462 | ||
464 | glue = kzalloc(sizeof(*glue), GFP_KERNEL); | 463 | glue = kzalloc(sizeof(*glue), GFP_KERNEL); |
465 | if (!glue) { | 464 | if (!glue) { |
@@ -467,18 +466,10 @@ static int __devinit am35x_probe(struct platform_device *pdev) | |||
467 | goto err0; | 466 | goto err0; |
468 | } | 467 | } |
469 | 468 | ||
470 | /* get the musb id */ | 469 | musb = platform_device_alloc("musb-hdrc", PLATFORM_DEVID_AUTO); |
471 | musbid = musb_get_id(&pdev->dev, GFP_KERNEL); | ||
472 | if (musbid < 0) { | ||
473 | dev_err(&pdev->dev, "failed to allocate musb id\n"); | ||
474 | ret = -ENOMEM; | ||
475 | goto err1; | ||
476 | } | ||
477 | |||
478 | musb = platform_device_alloc("musb-hdrc", musbid); | ||
479 | if (!musb) { | 470 | if (!musb) { |
480 | dev_err(&pdev->dev, "failed to allocate musb device\n"); | 471 | dev_err(&pdev->dev, "failed to allocate musb device\n"); |
481 | goto err2; | 472 | goto err1; |
482 | } | 473 | } |
483 | 474 | ||
484 | phy_clk = clk_get(&pdev->dev, "fck"); | 475 | phy_clk = clk_get(&pdev->dev, "fck"); |
@@ -507,7 +498,6 @@ static int __devinit am35x_probe(struct platform_device *pdev) | |||
507 | goto err6; | 498 | goto err6; |
508 | } | 499 | } |
509 | 500 | ||
510 | musb->id = musbid; | ||
511 | musb->dev.parent = &pdev->dev; | 501 | musb->dev.parent = &pdev->dev; |
512 | musb->dev.dma_mask = &am35x_dmamask; | 502 | musb->dev.dma_mask = &am35x_dmamask; |
513 | musb->dev.coherent_dma_mask = am35x_dmamask; | 503 | musb->dev.coherent_dma_mask = am35x_dmamask; |
@@ -557,9 +547,6 @@ err4: | |||
557 | err3: | 547 | err3: |
558 | platform_device_put(musb); | 548 | platform_device_put(musb); |
559 | 549 | ||
560 | err2: | ||
561 | musb_put_id(&pdev->dev, musbid); | ||
562 | |||
563 | err1: | 550 | err1: |
564 | kfree(glue); | 551 | kfree(glue); |
565 | 552 | ||
@@ -571,7 +558,6 @@ static int __devexit am35x_remove(struct platform_device *pdev) | |||
571 | { | 558 | { |
572 | struct am35x_glue *glue = platform_get_drvdata(pdev); | 559 | struct am35x_glue *glue = platform_get_drvdata(pdev); |
573 | 560 | ||
574 | musb_put_id(&pdev->dev, glue->musb->id); | ||
575 | platform_device_unregister(glue->musb); | 561 | platform_device_unregister(glue->musb); |
576 | clk_disable(glue->clk); | 562 | clk_disable(glue->clk); |
577 | clk_disable(glue->phy_clk); | 563 | clk_disable(glue->phy_clk); |