aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/musb/am35x.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/am35x.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/am35x.c')
-rw-r--r--drivers/usb/musb/am35x.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/usb/musb/am35x.c b/drivers/usb/musb/am35x.c
index e233d2b7d335..5285bda1dc4e 100644
--- a/drivers/usb/musb/am35x.c
+++ b/drivers/usb/musb/am35x.c
@@ -456,7 +456,7 @@ static const struct musb_platform_ops am35x_ops = {
456 456
457static u64 am35x_dmamask = DMA_BIT_MASK(32); 457static u64 am35x_dmamask = DMA_BIT_MASK(32);
458 458
459static int __init am35x_probe(struct platform_device *pdev) 459static int __devinit am35x_probe(struct platform_device *pdev)
460{ 460{
461 struct musb_hdrc_platform_data *pdata = pdev->dev.platform_data; 461 struct musb_hdrc_platform_data *pdata = pdev->dev.platform_data;
462 struct platform_device *musb; 462 struct platform_device *musb;
@@ -561,7 +561,7 @@ err0:
561 return ret; 561 return ret;
562} 562}
563 563
564static int __exit am35x_remove(struct platform_device *pdev) 564static int __devexit am35x_remove(struct platform_device *pdev)
565{ 565{
566 struct am35x_glue *glue = platform_get_drvdata(pdev); 566 struct am35x_glue *glue = platform_get_drvdata(pdev);
567 567
@@ -630,7 +630,8 @@ static struct dev_pm_ops am35x_pm_ops = {
630#endif 630#endif
631 631
632static struct platform_driver am35x_driver = { 632static struct platform_driver am35x_driver = {
633 .remove = __exit_p(am35x_remove), 633 .probe = am35x_probe,
634 .remove = __devexit_p(am35x_remove),
634 .driver = { 635 .driver = {
635 .name = "musb-am35x", 636 .name = "musb-am35x",
636 .pm = DEV_PM_OPS, 637 .pm = DEV_PM_OPS,
@@ -643,9 +644,9 @@ MODULE_LICENSE("GPL v2");
643 644
644static int __init am35x_init(void) 645static int __init am35x_init(void)
645{ 646{
646 return platform_driver_probe(&am35x_driver, am35x_probe); 647 return platform_driver_register(&am35x_driver);
647} 648}
648subsys_initcall(am35x_init); 649module_init(am35x_init);
649 650
650static void __exit am35x_exit(void) 651static void __exit am35x_exit(void)
651{ 652{