From: Sachin Kamat Date: Wed, 12 Dec 2012 08:58:12 +0000 (-0300) Subject: [media] gspca: Use module_usb_driver macro X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e52ec68015b81ccd5f0950d56328b78f43ae2985;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git [media] gspca: Use module_usb_driver macro module_usb_driver eliminates a lot of boilerplate by replacing module_init() and module_exit() calls. Signed-off-by: Sachin Kamat Signed-off-by: Hans de Goede Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/usb/gspca/jl2005bcd.c b/drivers/media/usb/gspca/jl2005bcd.c index 62ba80d9b998..fdaeeb14453f 100644 --- a/drivers/media/usb/gspca/jl2005bcd.c +++ b/drivers/media/usb/gspca/jl2005bcd.c @@ -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);