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/atm/ueagle-atm.c | 31 +------------------------------ 1 file changed, 1 insertion(+), 30 deletions(-) (limited to 'drivers/usb/atm/ueagle-atm.c') diff --git a/drivers/usb/atm/ueagle-atm.c b/drivers/usb/atm/ueagle-atm.c index 428f36801e06..00f171a7a8a0 100644 --- a/drivers/usb/atm/ueagle-atm.c +++ b/drivers/usb/atm/ueagle-atm.c @@ -2753,36 +2753,7 @@ static struct usb_driver uea_driver = { MODULE_DEVICE_TABLE(usb, uea_ids); -/** - * uea_init - Initialize the module. - * Register to USB subsystem - */ -static int __init uea_init(void) -{ - printk(KERN_INFO "[ueagle-atm] driver " EAGLEUSBVERSION " loaded\n"); - - usb_register(&uea_driver); - - return 0; -} - -module_init(uea_init); - -/** - * uea_exit - Destroy module - * Deregister with USB subsystem - */ -static void __exit uea_exit(void) -{ - /* - * This calls automatically the uea_disconnect method if necessary: - */ - usb_deregister(&uea_driver); - - printk(KERN_INFO "[ueagle-atm] driver unloaded\n"); -} - -module_exit(uea_exit); +module_usb_driver(uea_driver); MODULE_AUTHOR("Damien Bergamini/Matthieu Castet/Stanislaw W. Gruszka"); MODULE_DESCRIPTION("ADI 930/Eagle USB ADSL Modem driver"); -- cgit v1.2.3