summaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/cdc2.c
diff options
context:
space:
mode:
authorTobias Klauser2014-07-09 18:09:56 +0200
committerFelipe Balbi2014-07-10 15:37:09 +0200
commit909346a819c5b81420d861bd53abd1140b26104e (patch)
tree229682de918115a852058ce4228862de50cb68a7 /drivers/usb/gadget/cdc2.c
parentusb: gadget: Add helper macro for usb_composite_driver boilerplate (diff)
downloadkernel-qcow2-linux-909346a819c5b81420d861bd53abd1140b26104e.tar.gz
kernel-qcow2-linux-909346a819c5b81420d861bd53abd1140b26104e.tar.xz
kernel-qcow2-linux-909346a819c5b81420d861bd53abd1140b26104e.zip
usb: gadget: Convert drivers to use module_usb_composite_driver()
Use the module_usb_composite_driver() macro where applicable to eliminate the module_init/module_exit boilerplate in USB gadget composite drivers. Signed-off-by: Tobias Klauser <tklauser@distanz.ch> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/gadget/cdc2.c')
-rw-r--r--drivers/usb/gadget/cdc2.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/drivers/usb/gadget/cdc2.c b/drivers/usb/gadget/cdc2.c
index e126b6b248e6..2e85d9473478 100644
--- a/drivers/usb/gadget/cdc2.c
+++ b/drivers/usb/gadget/cdc2.c
@@ -231,18 +231,8 @@ static __refdata struct usb_composite_driver cdc_driver = {
.unbind = __exit_p(cdc_unbind),
};
+module_usb_composite_driver(cdc_driver);
+
MODULE_DESCRIPTION(DRIVER_DESC);
MODULE_AUTHOR("David Brownell");
MODULE_LICENSE("GPL");
-
-static int __init init(void)
-{
- return usb_composite_probe(&cdc_driver);
-}
-module_init(init);
-
-static void __exit cleanup(void)
-{
- usb_composite_unregister(&cdc_driver);
-}
-module_exit(cleanup);