diff options
author | Felipe Balbi <balbi@ti.com> | 2012-01-26 05:40:23 -0500 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2012-01-31 07:18:26 -0500 |
commit | e9e8c85e69310141d78daaecd6a56138700ac317 (patch) | |
tree | b778093675b5e115fc3289385ea323225fe66887 /drivers/usb/musb/davinci.c | |
parent | f557978745bbea2e7305588d33aac60f4dd42447 (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.c | 11 |
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 | ||
515 | static u64 davinci_dmamask = DMA_BIT_MASK(32); | 515 | static u64 davinci_dmamask = DMA_BIT_MASK(32); |
516 | 516 | ||
517 | static int __init davinci_probe(struct platform_device *pdev) | 517 | static 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 | ||
600 | static int __exit davinci_remove(struct platform_device *pdev) | 600 | static 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 | ||
613 | static struct platform_driver davinci_driver = { | 613 | static 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 | ||
624 | static int __init davinci_init(void) | 625 | static 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 | } |
628 | subsys_initcall(davinci_init); | 629 | module_init(davinci_init); |
629 | 630 | ||
630 | static void __exit davinci_exit(void) | 631 | static void __exit davinci_exit(void) |
631 | { | 632 | { |