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.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABAgAGBQJVtd37AAoJEEhZKYFQ1nG7hqsIAMVqiEuK7MK2lz+GsSsifP0u
 bv1Bo+D7D2vOltzwz49Kis+gcUxX01SKHXH9yqAjR9YQPBNaxwC7CM7tm1mH0lWL
 9NKNNdkjS0O9clfPiWm2qf3yQyBLQqTLQ3qXHzw2l3ryxyRyEoTbK+70XRffUpDy
 /5spaIi1z2bGSPrWySF7I/o7YXR/SdkKkVIkSuHXIkq/KB57RjH3XCOdvacBfawt
 d2sIyoEhku0DcsISnqvrPTmEdyCrNzLrfyjcvImFDypA8PtjAVT1/iVoRKVzvBeK
 9EQRwJfkuJ7AeR+g29ixQFqBfvrIQN2R/mJ8caH0cf0gjXekCJhfvy6bf8jYr38=
 =WQzl
 -----END PGP SIGNATURE-----

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.
This commit is contained in:
Greg Kroah-Hartman 2015-07-27 11:35:18 -07:00
commit a14aad05c6
3 changed files with 23 additions and 3 deletions

View File

@ -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");

View File

@ -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;
}

View File

@ -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 */