aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/chipidea
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/chipidea')
-rw-r--r--drivers/usb/chipidea/ci13xxx_msm.c21
1 files changed, 15 insertions, 6 deletions
diff --git a/drivers/usb/chipidea/ci13xxx_msm.c b/drivers/usb/chipidea/ci13xxx_msm.c
index 8d438b82e868..11a7befdc4ef 100644
--- a/drivers/usb/chipidea/ci13xxx_msm.c
+++ b/drivers/usb/chipidea/ci13xxx_msm.c
@@ -84,6 +84,8 @@ static int __devinit ci13xxx_msm_probe(struct platform_device *pdev)
84 if (ret) 84 if (ret)
85 goto put_platform; 85 goto put_platform;
86 86
87 platform_set_drvdata(pdev, plat_ci);
88
87 pm_runtime_no_callbacks(&pdev->dev); 89 pm_runtime_no_callbacks(&pdev->dev);
88 pm_runtime_enable(&pdev->dev); 90 pm_runtime_enable(&pdev->dev);
89 91
@@ -95,16 +97,23 @@ put_platform:
95 return ret; 97 return ret;
96} 98}
97 99
100static int __devexit ci13xxx_msm_remove(struct platform_device *pdev)
101{
102 struct platform_device *plat_ci = platform_get_drvdata(pdev);
103
104 pm_runtime_disable(&pdev->dev);
105 platform_device_unregister(plat_ci);
106
107 return 0;
108}
109
98static struct platform_driver ci13xxx_msm_driver = { 110static struct platform_driver ci13xxx_msm_driver = {
99 .probe = ci13xxx_msm_probe, 111 .probe = ci13xxx_msm_probe,
112 .remove = __devexit_p(ci13xxx_msm_remove),
100 .driver = { .name = "msm_hsusb", }, 113 .driver = { .name = "msm_hsusb", },
101}; 114};
102MODULE_ALIAS("platform:msm_hsusb");
103 115
104static int __init ci13xxx_msm_init(void) 116module_platform_driver(ci13xxx_msm_driver);
105{
106 return platform_driver_register(&ci13xxx_msm_driver);
107}
108module_init(ci13xxx_msm_init);
109 117
118MODULE_ALIAS("platform:msm_hsusb");
110MODULE_LICENSE("GPL v2"); 119MODULE_LICENSE("GPL v2");