diff options
author | Felipe Balbi <balbi@ti.com> | 2012-01-26 11:40:23 +0100 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2012-01-31 13:18:26 +0100 |
commit | e9e8c85e69310141d78daaecd6a56138700ac317 (patch) | |
tree | b778093675b5e115fc3289385ea323225fe66887 /drivers/usb/musb/ux500.c | |
parent | usb: musb: drop superfluous pm_runtime calls around musb_shutdown (diff) | |
download | linux-e9e8c85e69310141d78daaecd6a56138700ac317.tar.xz linux-e9e8c85e69310141d78daaecd6a56138700ac317.zip |
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/ux500.c')
-rw-r--r-- | drivers/usb/musb/ux500.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/usb/musb/ux500.c b/drivers/usb/musb/ux500.c index f7e04bf34a13..bcfc48f4854a 100644 --- a/drivers/usb/musb/ux500.c +++ b/drivers/usb/musb/ux500.c @@ -58,7 +58,7 @@ static const struct musb_platform_ops ux500_ops = { .exit = ux500_musb_exit, }; -static int __init ux500_probe(struct platform_device *pdev) +static int __devinit ux500_probe(struct platform_device *pdev) { struct musb_hdrc_platform_data *pdata = pdev->dev.platform_data; struct platform_device *musb; @@ -141,7 +141,7 @@ err0: return ret; } -static int __exit ux500_remove(struct platform_device *pdev) +static int __devexit ux500_remove(struct platform_device *pdev) { struct ux500_glue *glue = platform_get_drvdata(pdev); @@ -194,7 +194,8 @@ static const struct dev_pm_ops ux500_pm_ops = { #endif static struct platform_driver ux500_driver = { - .remove = __exit_p(ux500_remove), + .probe = ux500_probe, + .remove = __devexit_p(ux500_remove), .driver = { .name = "musb-ux500", .pm = DEV_PM_OPS, @@ -207,9 +208,9 @@ MODULE_LICENSE("GPL v2"); static int __init ux500_init(void) { - return platform_driver_probe(&ux500_driver, ux500_probe); + return platform_driver_register(&ux500_driver); } -subsys_initcall(ux500_init); +module_init(ux500_init); static void __exit ux500_exit(void) { |