aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/musb/da8xx.c
diff options
context:
space:
mode:
authorFelipe Balbi <balbi@ti.com>2012-01-26 05:40:23 -0500
committerFelipe Balbi <balbi@ti.com>2012-01-31 07:18:26 -0500
commite9e8c85e69310141d78daaecd6a56138700ac317 (patch)
treeb778093675b5e115fc3289385ea323225fe66887 /drivers/usb/musb/da8xx.c
parentf557978745bbea2e7305588d33aac60f4dd42447 (diff)
usb: musb: make modules behave better
There's really no point in doing all that initcall trickery when we can safely let udev handle module probing for us. Remove all of that trickery, by moving everybody to module_init() and making proper use of platform_device_register() rather than platform_device_probe(). Tested-by: Rajashekhara, Sudhakar <sudhakar.raj@ti.com> Tested-by: Tasslehoff Kjappfot <tasskjapp@gmail.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/musb/da8xx.c')
-rw-r--r--drivers/usb/musb/da8xx.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/usb/musb/da8xx.c b/drivers/usb/musb/da8xx.c
index 2613bfdb09b6..01c8f2ece084 100644
--- a/drivers/usb/musb/da8xx.c
+++ b/drivers/usb/musb/da8xx.c
@@ -478,7 +478,7 @@ static const struct musb_platform_ops da8xx_ops = {
478 478
479static u64 da8xx_dmamask = DMA_BIT_MASK(32); 479static u64 da8xx_dmamask = DMA_BIT_MASK(32);
480 480
481static int __init da8xx_probe(struct platform_device *pdev) 481static int __devinit da8xx_probe(struct platform_device *pdev)
482{ 482{
483 struct musb_hdrc_platform_data *pdata = pdev->dev.platform_data; 483 struct musb_hdrc_platform_data *pdata = pdev->dev.platform_data;
484 struct platform_device *musb; 484 struct platform_device *musb;
@@ -562,7 +562,7 @@ err0:
562 return ret; 562 return ret;
563} 563}
564 564
565static int __exit da8xx_remove(struct platform_device *pdev) 565static int __devexit da8xx_remove(struct platform_device *pdev)
566{ 566{
567 struct da8xx_glue *glue = platform_get_drvdata(pdev); 567 struct da8xx_glue *glue = platform_get_drvdata(pdev);
568 568
@@ -576,7 +576,8 @@ static int __exit da8xx_remove(struct platform_device *pdev)
576} 576}
577 577
578static struct platform_driver da8xx_driver = { 578static struct platform_driver da8xx_driver = {
579 .remove = __exit_p(da8xx_remove), 579 .probe = da8xx_probe,
580 .remove = __devexit_p(da8xx_remove),
580 .driver = { 581 .driver = {
581 .name = "musb-da8xx", 582 .name = "musb-da8xx",
582 }, 583 },
@@ -588,9 +589,9 @@ MODULE_LICENSE("GPL v2");
588 589
589static int __init da8xx_init(void) 590static int __init da8xx_init(void)
590{ 591{
591 return platform_driver_probe(&da8xx_driver, da8xx_probe); 592 return platform_driver_register(&da8xx_driver);
592} 593}
593subsys_initcall(da8xx_init); 594module_init(da8xx_init);
594 595
595static void __exit da8xx_exit(void) 596static void __exit da8xx_exit(void)
596{ 597{