Probe the usbmisc driver earlier, otherwise the ci_hdrc_imx.c will get -EPROBE_DEFER from usbmisc when both are compiled into the kernel and thus USB gadget mode won't work. Signed-off-by: Marek Vasut <marex@xxxxxxx> Cc: Alexander Shishkin <alexander.shishkin@xxxxxxxxxxxxxxx> Cc: Peter Chen <peter.chen@xxxxxxxxxxxxx> --- drivers/usb/chipidea/usbmisc_imx.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) NOTE: I'm not sure if this is a correct approach. The fs_initcall() is what we use in the PCI express driver to circumvent similar ordering issue, but maybe it should be in some arch_initcall() or something? diff --git a/drivers/usb/chipidea/usbmisc_imx.c b/drivers/usb/chipidea/usbmisc_imx.c index 8a1094b..7764101 100644 --- a/drivers/usb/chipidea/usbmisc_imx.c +++ b/drivers/usb/chipidea/usbmisc_imx.c @@ -224,7 +224,6 @@ static int usbmisc_imx_remove(struct platform_device *pdev) } static struct platform_driver usbmisc_imx_driver = { - .probe = usbmisc_imx_probe, .remove = usbmisc_imx_remove, .driver = { .name = "usbmisc_imx", @@ -233,7 +232,17 @@ static struct platform_driver usbmisc_imx_driver = { }, }; -module_platform_driver(usbmisc_imx_driver); +static int __init usbmisc_imx_init(void) +{ + return platform_driver_probe(&usbmisc_imx_driver, usbmisc_imx_probe); +} +fs_initcall(usbmisc_imx_init); + +static void __exit usbmisc_imx_exit(void) +{ + platform_driver_unregister(&usbmisc_imx_driver); +} +module_exit(usbmisc_imx_exit); MODULE_ALIAS("platform:usbmisc-imx"); MODULE_LICENSE("GPL v2"); -- 1.8.4.2 -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html