diff options
author | Ezequiel Garcia <ezequiel.garcia@free-electrons.com> | 2013-12-26 09:24:52 -0300 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2013-12-26 10:17:40 -0600 |
commit | 89f836a8c56bfea6585a09f7afff7094968a4fd0 (patch) | |
tree | f0d18973426f0b8514124a9456fbbeac84622116 | |
parent | 4685d021f5cd04bd2682bd4db6dfa9f784fabf9f (diff) | |
download | op-kernel-dev-89f836a8c56bfea6585a09f7afff7094968a4fd0.zip op-kernel-dev-89f836a8c56bfea6585a09f7afff7094968a4fd0.tar.gz |
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: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
-rw-r--r-- | drivers/usb/musb/musb_core.c | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c index 0e7f4a0..5942f00 100644 --- a/drivers/usb/musb/musb_core.c +++ b/drivers/usb/musb/musb_core.c @@ -2325,19 +2325,4 @@ static struct platform_driver musb_driver = { .shutdown = musb_shutdown, }; -/*-------------------------------------------------------------------------*/ - -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); +module_platform_driver(musb_driver); |