From: Greg Kroah-Hartman Date: Mon, 23 Apr 2012 23:13:19 +0000 (-0700) Subject: Staging: line6: use module_usb_driver() X-Git-Tag: v3.12-rc1~3149^2~229^2~135 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4a6313644c3188f4aa1a6b4403896375baa2e09a;p=kernel%2Fkernel-generic.git 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 CC: Stefan Hajnoczi CC: Julia Lawall CC: Dan Carpenter Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/line6/driver.c b/drivers/staging/line6/driver.c index c476fcc3..4513f78 100644 --- a/drivers/staging/line6/driver.c +++ b/drivers/staging/line6/driver.c @@ -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);