summaryrefslogtreecommitdiffstats
path: root/kernel/drivers/usb/chipidea
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/drivers/usb/chipidea')
-rw-r--r--kernel/drivers/usb/chipidea/core.c13
-rw-r--r--kernel/drivers/usb/chipidea/host.c7
-rw-r--r--kernel/drivers/usb/chipidea/host.h6
3 files changed, 23 insertions, 3 deletions
diff --git a/kernel/drivers/usb/chipidea/core.c b/kernel/drivers/usb/chipidea/core.c
index 74fea4fa4..3ad48e1c0 100644
--- a/kernel/drivers/usb/chipidea/core.c
+++ b/kernel/drivers/usb/chipidea/core.c
@@ -1024,7 +1024,18 @@ static struct platform_driver ci_hdrc_driver = {
},
};
-module_platform_driver(ci_hdrc_driver);
+static int __init ci_hdrc_platform_register(void)
+{
+ ci_hdrc_host_driver_init();
+ return platform_driver_register(&ci_hdrc_driver);
+}
+module_init(ci_hdrc_platform_register);
+
+static void __exit ci_hdrc_platform_unregister(void)
+{
+ platform_driver_unregister(&ci_hdrc_driver);
+}
+module_exit(ci_hdrc_platform_unregister);
MODULE_ALIAS("platform:ci_hdrc");
MODULE_LICENSE("GPL v2");
diff --git a/kernel/drivers/usb/chipidea/host.c b/kernel/drivers/usb/chipidea/host.c
index 21fe1a314..2f8af40e8 100644
--- a/kernel/drivers/usb/chipidea/host.c
+++ b/kernel/drivers/usb/chipidea/host.c
@@ -237,9 +237,12 @@ int ci_hdrc_host_init(struct ci_hdrc *ci)
rdrv->name = "host";
ci->roles[CI_ROLE_HOST] = rdrv;
+ return 0;
+}
+
+void ci_hdrc_host_driver_init(void)
+{
ehci_init_driver(&ci_ehci_hc_driver, &ehci_ci_overrides);
orig_bus_suspend = ci_ehci_hc_driver.bus_suspend;
ci_ehci_hc_driver.bus_suspend = ci_ehci_bus_suspend;
-
- return 0;
}
diff --git a/kernel/drivers/usb/chipidea/host.h b/kernel/drivers/usb/chipidea/host.h
index 5707bf379..0f12f131b 100644
--- a/kernel/drivers/usb/chipidea/host.h
+++ b/kernel/drivers/usb/chipidea/host.h
@@ -5,6 +5,7 @@
int ci_hdrc_host_init(struct ci_hdrc *ci);
void ci_hdrc_host_destroy(struct ci_hdrc *ci);
+void ci_hdrc_host_driver_init(void);
#else
@@ -18,6 +19,11 @@ static inline void ci_hdrc_host_destroy(struct ci_hdrc *ci)
}
+static void ci_hdrc_host_driver_init(void)
+{
+
+}
+
#endif
#endif /* __DRIVERS_USB_CHIPIDEA_HOST_H */