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/blackfin.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/blackfin.c')
-rw-r--r-- | drivers/usb/musb/blackfin.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/usb/musb/blackfin.c b/drivers/usb/musb/blackfin.c index 5e7cfba5b079..261af3487b5e 100644 --- a/drivers/usb/musb/blackfin.c +++ b/drivers/usb/musb/blackfin.c | |||
@@ -463,7 +463,7 @@ static const struct musb_platform_ops bfin_ops = { | |||
463 | 463 | ||
464 | static u64 bfin_dmamask = DMA_BIT_MASK(32); | 464 | static u64 bfin_dmamask = DMA_BIT_MASK(32); |
465 | 465 | ||
466 | static int __init bfin_probe(struct platform_device *pdev) | 466 | static int __devinit bfin_probe(struct platform_device *pdev) |
467 | { | 467 | { |
468 | struct musb_hdrc_platform_data *pdata = pdev->dev.platform_data; | 468 | struct musb_hdrc_platform_data *pdata = pdev->dev.platform_data; |
469 | struct platform_device *musb; | 469 | struct platform_device *musb; |
@@ -525,7 +525,7 @@ err0: | |||
525 | return ret; | 525 | return ret; |
526 | } | 526 | } |
527 | 527 | ||
528 | static int __exit bfin_remove(struct platform_device *pdev) | 528 | static int __devexit bfin_remove(struct platform_device *pdev) |
529 | { | 529 | { |
530 | struct bfin_glue *glue = platform_get_drvdata(pdev); | 530 | struct bfin_glue *glue = platform_get_drvdata(pdev); |
531 | 531 | ||
@@ -575,6 +575,7 @@ static struct dev_pm_ops bfin_pm_ops = { | |||
575 | #endif | 575 | #endif |
576 | 576 | ||
577 | static struct platform_driver bfin_driver = { | 577 | static struct platform_driver bfin_driver = { |
578 | .probe = bfin_probe, | ||
578 | .remove = __exit_p(bfin_remove), | 579 | .remove = __exit_p(bfin_remove), |
579 | .driver = { | 580 | .driver = { |
580 | .name = "musb-blackfin", | 581 | .name = "musb-blackfin", |
@@ -588,9 +589,9 @@ MODULE_LICENSE("GPL v2"); | |||
588 | 589 | ||
589 | static int __init bfin_init(void) | 590 | static int __init bfin_init(void) |
590 | { | 591 | { |
591 | return platform_driver_probe(&bfin_driver, bfin_probe); | 592 | return platform_driver_register(&bfin_driver); |
592 | } | 593 | } |
593 | subsys_initcall(bfin_init); | 594 | module_init(bfin_init); |
594 | 595 | ||
595 | static void __exit bfin_exit(void) | 596 | static void __exit bfin_exit(void) |
596 | { | 597 | { |