Skip to content

Commit

Permalink
[media] gspca: Use module_usb_driver macro
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Sachin Kamat authored and Mauro Carvalho Chehab committed Dec 21, 2012
1 parent c307538 commit e52ec68
Showing 1 changed file with 1 addition and 17 deletions.
18 changes: 1 addition & 17 deletions drivers/media/usb/gspca/jl2005bcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

0 comments on commit e52ec68

Please sign in to comment.