[media] gspca: Use module_usb_driver macro
authorSachin Kamat <sachin.kamat@linaro.org>
Wed, 12 Dec 2012 08:58:12 +0000 (05:58 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Fri, 21 Dec 2012 15:37:11 +0000 (13:37 -0200)
module_usb_driver eliminates a lot of boilerplate by replacing
module_init() and module_exit() calls.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/usb/gspca/jl2005bcd.c

index 62ba80d..fdaeeb1 100644 (file)
@@ -536,20 +536,4 @@ static struct usb_driver sd_driver = {
 #endif
 };
 
-/* -- module insert / remove -- */
-static int __init sd_mod_init(void)
-{
-       int ret;
-
-       ret = usb_register(&sd_driver);
-       if (ret < 0)
-               return ret;
-       return 0;
-}
-static void __exit sd_mod_exit(void)
-{
-       usb_deregister(&sd_driver);
-}
-
-module_init(sd_mod_init);
-module_exit(sd_mod_exit);
+module_usb_driver(sd_driver);