summaryrefslogtreecommitdiffstats
path: root/drivers/usb/musb/omap2430.c
diff options
context:
space:
mode:
authorFelipe Balbi2012-01-26 11:40:23 +0100
committerFelipe Balbi2012-01-31 13:18:26 +0100
commite9e8c85e69310141d78daaecd6a56138700ac317 (patch)
treeb778093675b5e115fc3289385ea323225fe66887 /drivers/usb/musb/omap2430.c
parentusb: musb: drop superfluous pm_runtime calls around musb_shutdown (diff)
downloadkernel-qcow2-linux-e9e8c85e69310141d78daaecd6a56138700ac317.tar.gz
kernel-qcow2-linux-e9e8c85e69310141d78daaecd6a56138700ac317.tar.xz
kernel-qcow2-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/omap2430.c')
-rw-r--r--drivers/usb/musb/omap2430.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c
index c27bbbf32b52..b254173e7e85 100644
--- a/drivers/usb/musb/omap2430.c
+++ b/drivers/usb/musb/omap2430.c
@@ -408,7 +408,7 @@ static const struct musb_platform_ops omap2430_ops = {
static u64 omap2430_dmamask = DMA_BIT_MASK(32);
-static int __init omap2430_probe(struct platform_device *pdev)
+static int __devinit omap2430_probe(struct platform_device *pdev)
{
struct musb_hdrc_platform_data *pdata = pdev->dev.platform_data;
struct platform_device *musb;
@@ -471,7 +471,7 @@ err0:
return ret;
}
-static int __exit omap2430_remove(struct platform_device *pdev)
+static int __devexit omap2430_remove(struct platform_device *pdev)
{
struct omap2430_glue *glue = platform_get_drvdata(pdev);
@@ -524,7 +524,8 @@ static struct dev_pm_ops omap2430_pm_ops = {
#endif
static struct platform_driver omap2430_driver = {
- .remove = __exit_p(omap2430_remove),
+ .probe = omap2430_probe,
+ .remove = __devexit_p(omap2430_remove),
.driver = {
.name = "musb-omap2430",
.pm = DEV_PM_OPS,
@@ -537,9 +538,9 @@ MODULE_LICENSE("GPL v2");
static int __init omap2430_init(void)
{
- return platform_driver_probe(&omap2430_driver, omap2430_probe);
+ return platform_driver_register(&omap2430_driver);
}
-subsys_initcall(omap2430_init);
+module_init(omap2430_init);
static void __exit omap2430_exit(void)
{