aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/musb/davinci.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/davinci.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/davinci.c')
-rw-r--r--drivers/usb/musb/davinci.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/usb/musb/davinci.c b/drivers/usb/musb/davinci.c
index f9a3f62a83b5..7802c7ec43f9 100644
--- a/drivers/usb/musb/davinci.c
+++ b/drivers/usb/musb/davinci.c
@@ -514,7 +514,7 @@ static const struct musb_platform_ops davinci_ops = {
514 514
515static u64 davinci_dmamask = DMA_BIT_MASK(32); 515static u64 davinci_dmamask = DMA_BIT_MASK(32);
516 516
517static int __init davinci_probe(struct platform_device *pdev) 517static int __devinit davinci_probe(struct platform_device *pdev)
518{ 518{
519 struct musb_hdrc_platform_data *pdata = pdev->dev.platform_data; 519 struct musb_hdrc_platform_data *pdata = pdev->dev.platform_data;
520 struct platform_device *musb; 520 struct platform_device *musb;
@@ -597,7 +597,7 @@ err0:
597 return ret; 597 return ret;
598} 598}
599 599
600static int __exit davinci_remove(struct platform_device *pdev) 600static int __devexit davinci_remove(struct platform_device *pdev)
601{ 601{
602 struct davinci_glue *glue = platform_get_drvdata(pdev); 602 struct davinci_glue *glue = platform_get_drvdata(pdev);
603 603
@@ -611,7 +611,8 @@ static int __exit davinci_remove(struct platform_device *pdev)
611} 611}
612 612
613static struct platform_driver davinci_driver = { 613static struct platform_driver davinci_driver = {
614 .remove = __exit_p(davinci_remove), 614 .probe = davinci_probe,
615 .remove = __devexit_p(davinci_remove),
615 .driver = { 616 .driver = {
616 .name = "musb-davinci", 617 .name = "musb-davinci",
617 }, 618 },
@@ -623,9 +624,9 @@ MODULE_LICENSE("GPL v2");
623 624
624static int __init davinci_init(void) 625static int __init davinci_init(void)
625{ 626{
626 return platform_driver_probe(&davinci_driver, davinci_probe); 627 return platform_driver_register(&davinci_driver);
627} 628}
628subsys_initcall(davinci_init); 629module_init(davinci_init);
629 630
630static void __exit davinci_exit(void) 631static void __exit davinci_exit(void)
631{ 632{