mirror of
https://github.com/torvalds/linux.git
synced 2024-11-02 10:11:36 +00:00
Staging: line6: use module_usb_driver()
Now that our module_init/exit path is just registering and unregistering the usb driver, we can use module_usb_driver() instead. This also has the nice side affect of removing the unneeded printk for the module version number. CC: Markus Grabner <grabner@icg.tugraz.at> CC: Stefan Hajnoczi <stefanha@gmail.com> CC: Julia Lawall <julia@diku.dk> CC: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
15a89dc83b
commit
4a6313644c
@ -1300,26 +1300,7 @@ static struct usb_driver line6_driver = {
|
||||
.id_table = line6_id_table,
|
||||
};
|
||||
|
||||
/*
|
||||
Module initialization.
|
||||
*/
|
||||
static int __init line6_init(void)
|
||||
{
|
||||
printk(KERN_INFO "%s driver version %s\n", DRIVER_NAME, DRIVER_VERSION);
|
||||
|
||||
return usb_register(&line6_driver);
|
||||
}
|
||||
|
||||
/*
|
||||
Module cleanup.
|
||||
*/
|
||||
static void __exit line6_exit(void)
|
||||
{
|
||||
usb_deregister(&line6_driver);
|
||||
}
|
||||
|
||||
module_init(line6_init);
|
||||
module_exit(line6_exit);
|
||||
module_usb_driver(line6_driver);
|
||||
|
||||
MODULE_AUTHOR(DRIVER_AUTHOR);
|
||||
MODULE_DESCRIPTION(DRIVER_DESC);
|
||||
|
Loading…
Reference in New Issue
Block a user