Commit a14aad05 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

Merge tag 'usb-ci-v4.2-rc5' of...

Merge tag 'usb-ci-v4.2-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/peter.chen/usb into usb-linus

Peter writes:

It is a bug fix that using ehci_init_driver at wrong place, the
correct place should be at ci core driver's module_init, and
only be called one time.
parents cbfe8fa6 2f01a33b
......@@ -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");
......
......@@ -249,9 +249,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;
}
......@@ -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 */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment