Commit 89f836a8 authored by Ezequiel Garcia's avatar Ezequiel Garcia Committed by Felipe Balbi

usb: musb: Remove usb_disable() check in module_init()

Removing the check to usb_disable() before registering the platform
driver allows to build this driver when !USB && USB_GADGET, to be
used in gadget-only mode.

Also, use module_platform_driver() to register the platform driver.
Signed-off-by: default avatarEzequiel Garcia <ezequiel.garcia@free-electrons.com>
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parent 4685d021
...@@ -2325,19 +2325,4 @@ static struct platform_driver musb_driver = { ...@@ -2325,19 +2325,4 @@ static struct platform_driver musb_driver = {
.shutdown = musb_shutdown, .shutdown = musb_shutdown,
}; };
/*-------------------------------------------------------------------------*/ module_platform_driver(musb_driver);
static int __init musb_init(void)
{
if (usb_disabled())
return 0;
return platform_driver_register(&musb_driver);
}
module_init(musb_init);
static void __exit musb_cleanup(void)
{
platform_driver_unregister(&musb_driver);
}
module_exit(musb_cleanup);
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