diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-04-23 23:33:52 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-04-23 23:33:52 (GMT) |
commit | 8d0572504802742ae21f1aaa499478c4e23bd4ef (patch) | |
tree | ae1b4bb5218f26920eec8aec2db0be02cdc88035 /drivers | |
parent | 4a6313644c3188f4aa1a6b4403896375baa2e09a (diff) | |
download | linux-8d0572504802742ae21f1aaa499478c4e23bd4ef.tar.xz |
Staging: media: go7007: use module_usb_driver()
There is no need to initialize a static array to NULL at startup, so we
can use the module_usb_driver() call for the go7007 module.
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/media/go7007/s2250-loader.c | 26 |
1 files changed, 1 insertions, 25 deletions
diff --git a/drivers/staging/media/go7007/s2250-loader.c b/drivers/staging/media/go7007/s2250-loader.c index 4e13251..7c5af4f 100644 --- a/drivers/staging/media/go7007/s2250-loader.c +++ b/drivers/staging/media/go7007/s2250-loader.c @@ -160,31 +160,7 @@ static struct usb_driver s2250loader_driver = { .id_table = s2250loader_ids, }; -static int __init s2250loader_init(void) -{ - int r; - unsigned i = 0; - - for (i = 0; i < MAX_DEVICES; i++) - s2250_dev_table[i] = NULL; - - r = usb_register(&s2250loader_driver); - if (r) { - printk(KERN_ERR "usb_register failed. Error number %d\n", r); - return -1; - } - - printk(KERN_INFO "s2250loader_init: driver registered\n"); - return 0; -} -module_init(s2250loader_init); - -static void __exit s2250loader_cleanup(void) -{ - printk(KERN_INFO "s2250loader_cleanup\n"); - usb_deregister(&s2250loader_driver); -} -module_exit(s2250loader_cleanup); +module_usb_driver(s2250loader_driver); MODULE_AUTHOR(""); MODULE_DESCRIPTION("firmware loader for Sensoray 2250/2251"); |