From 65db43054065790a75291b0834657445fea2cf56 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Fri, 18 Nov 2011 09:34:02 -0800 Subject: USB: convert drivers/usb/* to use module_usb_driver() This converts the drivers in drivers/usb/* to use the module_usb_driver() macro which makes the code smaller and a bit simpler. Added bonus is that it removes some unneeded kernel log messages about drivers loading and/or unloading. Cc: Simon Arlott Cc: Duncan Sands Cc: Matthieu CASTET Cc: Stanislaw Gruszka Cc: Pete Zaitcev Cc: Oliver Neukum Cc: Juergen Stuber Cc: Cesar Miquel Cc: Matthew Dharm Cc: Matthew Wilcox Cc: Sarah Sharp Cc: Kuninori Morimoto Cc: Felipe Balbi Cc: Lucas De Marchi Cc: Michael Hund Cc: Zack Parsons Cc: Melchior FRANZ Cc: Tomoki Sekiyama Cc: Dan Carpenter Signed-off-by: Greg Kroah-Hartman --- drivers/usb/misc/trancevibrator.c | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) (limited to 'drivers/usb/misc/trancevibrator.c') diff --git a/drivers/usb/misc/trancevibrator.c b/drivers/usb/misc/trancevibrator.c index f63776a48e2a..741efed4a236 100644 --- a/drivers/usb/misc/trancevibrator.c +++ b/drivers/usb/misc/trancevibrator.c @@ -137,26 +137,7 @@ static struct usb_driver tv_driver = { .id_table = id_table, }; -static int __init tv_init(void) -{ - int retval = usb_register(&tv_driver); - if (retval) { - err("usb_register failed. Error number %d", retval); - return retval; - } - - printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION ":" - DRIVER_DESC "\n"); - return 0; -} - -static void __exit tv_exit(void) -{ - usb_deregister(&tv_driver); -} - -module_init (tv_init); -module_exit (tv_exit); +module_usb_driver(tv_driver); MODULE_AUTHOR(DRIVER_AUTHOR); MODULE_DESCRIPTION(DRIVER_DESC); -- cgit v1.2.3