Commit 8d057250 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

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: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 4a631364
...@@ -160,31 +160,7 @@ static struct usb_driver s2250loader_driver = { ...@@ -160,31 +160,7 @@ static struct usb_driver s2250loader_driver = {
.id_table = s2250loader_ids, .id_table = s2250loader_ids,
}; };
static int __init s2250loader_init(void) module_usb_driver(s2250loader_driver);
{
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_AUTHOR(""); MODULE_AUTHOR("");
MODULE_DESCRIPTION("firmware loader for Sensoray 2250/2251"); MODULE_DESCRIPTION("firmware loader for Sensoray 2250/2251");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment