summaryrefslogtreecommitdiff
path: root/drivers/usb/gadget/webcam.c
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2014-07-09 16:09:56 (GMT)
committerFelipe Balbi <balbi@ti.com>2014-07-10 13:37:09 (GMT)
commit909346a819c5b81420d861bd53abd1140b26104e (patch)
tree229682de918115a852058ce4228862de50cb68a7 /drivers/usb/gadget/webcam.c
parent7ec3ea181d8cffb669982d79664f119ef6a71fc3 (diff)
downloadlinux-909346a819c5b81420d861bd53abd1140b26104e.tar.xz
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/webcam.c')
-rw-r--r--drivers/usb/gadget/webcam.c15
1 files changed, 1 insertions, 14 deletions
diff --git a/drivers/usb/gadget/webcam.c b/drivers/usb/gadget/webcam.c
index 8cef1e6..a11d8e4 100644
--- a/drivers/usb/gadget/webcam.c
+++ b/drivers/usb/gadget/webcam.c
@@ -390,20 +390,7 @@ static __refdata struct usb_composite_driver webcam_driver = {
.unbind = webcam_unbind,
};
-static int __init
-webcam_init(void)
-{
- return usb_composite_probe(&webcam_driver);
-}
-
-static void __exit
-webcam_cleanup(void)
-{
- usb_composite_unregister(&webcam_driver);
-}
-
-module_init(webcam_init);
-module_exit(webcam_cleanup);
+module_usb_composite_driver(webcam_driver);
MODULE_AUTHOR("Laurent Pinchart");
MODULE_DESCRIPTION("Webcam Video Gadget");