diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-12-11 17:48:20 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-12-11 17:48:20 -0500 |
commit | 414a6750e59b0b687034764c464e9ddecac0f7a6 (patch) | |
tree | 18a5ceb11359cd72fcb2d31b5eabf3e35328697f /drivers/usb/musb/davinci.c | |
parent | c6bd5bcc4983f1a2d2f87a3769bf309482ee8c04 (diff) | |
parent | fb37ef98015f864d22be223a0e0d93547cd1d4ef (diff) |
Merge tag 'usb-3.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
Pull USB patches from Greg Kroah-Hartman:
"Here's the big set of USB patches for 3.8-rc1.
Lots of USB host driver cleanups in here, and a bit of a reorg of the
EHCI driver to make it easier for the different EHCI platform drivers
to all work together nicer, which was a reduction in overall code. We
also deleted some unused firmware files, and got rid of the very old
file_storage usb gadget driver that had been broken for a long time.
This means we ended up removing way more code than added, always a
nice thing to see:
310 files changed, 3028 insertions(+), 10754 deletions(-)
Other than that, the usual set of new device ids, driver fixes, gadget
driver and controller updates and the like.
All of these have been in the linux-next tree for a number of weeks.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>"
* tag 'usb-3.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (228 commits)
USB: mark uas driver as BROKEN
xhci: Add Lynx Point LP to list of Intel switchable hosts
uwb: fix uwb_dev_unlock() missed at an error path in uwb_rc_cmd_async()
USB: ftdi_sio: Add support for Newport AGILIS motor drivers
MAINTAINERS: remove drivers/block/ub.c
USB: chipidea: fix use after free bug
ezusb: add dependency to USB
usb: ftdi_sio: fixup BeagleBone A5+ quirk
USB: cp210x: add Virtenio Preon32 device id
usb: storage: remove redundant memset() in usb_probe_stor1()
USB: option: blacklist network interface on Huawei E173
USB: OHCI: workaround for hardware bug: retired TDs not added to the Done Queue
USB: add new zte 3g-dongle's pid to option.c
USB: opticon: switch to generic read implementation
USB: opticon: refactor reab-urb processing
USB: opticon: use usb-serial bulk-in urb
USB: opticon: increase bulk-in size
USB: opticon: use port as urb context
USB: opticon: pass port to get_serial_info
USB: opticon: make private data port specific
...
Diffstat (limited to 'drivers/usb/musb/davinci.c')
-rw-r--r-- | drivers/usb/musb/davinci.c | 40 |
1 files changed, 7 insertions, 33 deletions
diff --git a/drivers/usb/musb/davinci.c b/drivers/usb/musb/davinci.c index 606bfd00cde6..b1c01cad28b2 100644 --- a/drivers/usb/musb/davinci.c +++ b/drivers/usb/musb/davinci.c | |||
@@ -504,7 +504,7 @@ static const struct musb_platform_ops davinci_ops = { | |||
504 | 504 | ||
505 | static u64 davinci_dmamask = DMA_BIT_MASK(32); | 505 | static u64 davinci_dmamask = DMA_BIT_MASK(32); |
506 | 506 | ||
507 | static int __devinit davinci_probe(struct platform_device *pdev) | 507 | static int davinci_probe(struct platform_device *pdev) |
508 | { | 508 | { |
509 | struct musb_hdrc_platform_data *pdata = pdev->dev.platform_data; | 509 | struct musb_hdrc_platform_data *pdata = pdev->dev.platform_data; |
510 | struct platform_device *musb; | 510 | struct platform_device *musb; |
@@ -512,7 +512,6 @@ static int __devinit davinci_probe(struct platform_device *pdev) | |||
512 | struct clk *clk; | 512 | struct clk *clk; |
513 | 513 | ||
514 | int ret = -ENOMEM; | 514 | int ret = -ENOMEM; |
515 | int musbid; | ||
516 | 515 | ||
517 | glue = kzalloc(sizeof(*glue), GFP_KERNEL); | 516 | glue = kzalloc(sizeof(*glue), GFP_KERNEL); |
518 | if (!glue) { | 517 | if (!glue) { |
@@ -520,18 +519,10 @@ static int __devinit davinci_probe(struct platform_device *pdev) | |||
520 | goto err0; | 519 | goto err0; |
521 | } | 520 | } |
522 | 521 | ||
523 | /* get the musb id */ | 522 | musb = platform_device_alloc("musb-hdrc", PLATFORM_DEVID_AUTO); |
524 | musbid = musb_get_id(&pdev->dev, GFP_KERNEL); | ||
525 | if (musbid < 0) { | ||
526 | dev_err(&pdev->dev, "failed to allocate musb id\n"); | ||
527 | ret = -ENOMEM; | ||
528 | goto err1; | ||
529 | } | ||
530 | |||
531 | musb = platform_device_alloc("musb-hdrc", musbid); | ||
532 | if (!musb) { | 523 | if (!musb) { |
533 | dev_err(&pdev->dev, "failed to allocate musb device\n"); | 524 | dev_err(&pdev->dev, "failed to allocate musb device\n"); |
534 | goto err2; | 525 | goto err1; |
535 | } | 526 | } |
536 | 527 | ||
537 | clk = clk_get(&pdev->dev, "usb"); | 528 | clk = clk_get(&pdev->dev, "usb"); |
@@ -547,7 +538,6 @@ static int __devinit davinci_probe(struct platform_device *pdev) | |||
547 | goto err4; | 538 | goto err4; |
548 | } | 539 | } |
549 | 540 | ||
550 | musb->id = musbid; | ||
551 | musb->dev.parent = &pdev->dev; | 541 | musb->dev.parent = &pdev->dev; |
552 | musb->dev.dma_mask = &davinci_dmamask; | 542 | musb->dev.dma_mask = &davinci_dmamask; |
553 | musb->dev.coherent_dma_mask = davinci_dmamask; | 543 | musb->dev.coherent_dma_mask = davinci_dmamask; |
@@ -590,9 +580,6 @@ err4: | |||
590 | err3: | 580 | err3: |
591 | platform_device_put(musb); | 581 | platform_device_put(musb); |
592 | 582 | ||
593 | err2: | ||
594 | musb_put_id(&pdev->dev, musbid); | ||
595 | |||
596 | err1: | 583 | err1: |
597 | kfree(glue); | 584 | kfree(glue); |
598 | 585 | ||
@@ -600,13 +587,11 @@ err0: | |||
600 | return ret; | 587 | return ret; |
601 | } | 588 | } |
602 | 589 | ||
603 | static int __devexit davinci_remove(struct platform_device *pdev) | 590 | static int davinci_remove(struct platform_device *pdev) |
604 | { | 591 | { |
605 | struct davinci_glue *glue = platform_get_drvdata(pdev); | 592 | struct davinci_glue *glue = platform_get_drvdata(pdev); |
606 | 593 | ||
607 | musb_put_id(&pdev->dev, glue->musb->id); | 594 | platform_device_unregister(glue->musb); |
608 | platform_device_del(glue->musb); | ||
609 | platform_device_put(glue->musb); | ||
610 | clk_disable(glue->clk); | 595 | clk_disable(glue->clk); |
611 | clk_put(glue->clk); | 596 | clk_put(glue->clk); |
612 | kfree(glue); | 597 | kfree(glue); |
@@ -616,7 +601,7 @@ static int __devexit davinci_remove(struct platform_device *pdev) | |||
616 | 601 | ||
617 | static struct platform_driver davinci_driver = { | 602 | static struct platform_driver davinci_driver = { |
618 | .probe = davinci_probe, | 603 | .probe = davinci_probe, |
619 | .remove = __devexit_p(davinci_remove), | 604 | .remove = davinci_remove, |
620 | .driver = { | 605 | .driver = { |
621 | .name = "musb-davinci", | 606 | .name = "musb-davinci", |
622 | }, | 607 | }, |
@@ -625,15 +610,4 @@ static struct platform_driver davinci_driver = { | |||
625 | MODULE_DESCRIPTION("DaVinci MUSB Glue Layer"); | 610 | MODULE_DESCRIPTION("DaVinci MUSB Glue Layer"); |
626 | MODULE_AUTHOR("Felipe Balbi <balbi@ti.com>"); | 611 | MODULE_AUTHOR("Felipe Balbi <balbi@ti.com>"); |
627 | MODULE_LICENSE("GPL v2"); | 612 | MODULE_LICENSE("GPL v2"); |
628 | 613 | module_platform_driver(davinci_driver); | |
629 | static int __init davinci_init(void) | ||
630 | { | ||
631 | return platform_driver_register(&davinci_driver); | ||
632 | } | ||
633 | module_init(davinci_init); | ||
634 | |||
635 | static void __exit davinci_exit(void) | ||
636 | { | ||
637 | platform_driver_unregister(&davinci_driver); | ||
638 | } | ||
639 | module_exit(davinci_exit); | ||