From fe7484834bb614c2c205726647635171ce6cc070 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Fri, 18 Nov 2011 09:52:10 -0800 Subject: USB: convert some miscellanies drivers to use module_usb_driver() This converts the remaining USB drivers in the kernel 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: Guenter Roeck Cc: Jean Delvare Cc: Ben Dooks Cc: Till Harbaum Cc: Karsten Keil Cc: Chris Ball Cc: David Woodhouse Cc: Lauro Ramos Venancio Cc: Aloisio Almeida Jr Cc: Samuel Ortiz Cc: Steve Glendinning Cc: Florian Tobias Schandinat Cc: Evgeniy Polyakov Cc: Wim Van Sebroeck Cc: "David S. Miller" Cc: Jesper Juhl Cc: Artem Bityutskiy Cc: Jamie Iles Cc: Andrew Morton Signed-off-by: Greg Kroah-Hartman --- drivers/watchdog/pcwd_usb.c | 35 +---------------------------------- 1 file changed, 1 insertion(+), 34 deletions(-) (limited to 'drivers/watchdog') diff --git a/drivers/watchdog/pcwd_usb.c b/drivers/watchdog/pcwd_usb.c index 748a74bd85e7..d8de1ddd176a 100644 --- a/drivers/watchdog/pcwd_usb.c +++ b/drivers/watchdog/pcwd_usb.c @@ -827,37 +827,4 @@ static void usb_pcwd_disconnect(struct usb_interface *interface) printk(KERN_INFO PFX "USB PC Watchdog disconnected\n"); } - - -/** - * usb_pcwd_init - */ -static int __init usb_pcwd_init(void) -{ - int result; - - /* register this driver with the USB subsystem */ - result = usb_register(&usb_pcwd_driver); - if (result) { - printk(KERN_ERR PFX "usb_register failed. Error number %d\n", - result); - return result; - } - - printk(KERN_INFO PFX DRIVER_DESC " v" DRIVER_VERSION "\n"); - return 0; -} - - -/** - * usb_pcwd_exit - */ -static void __exit usb_pcwd_exit(void) -{ - /* deregister this driver with the USB subsystem */ - usb_deregister(&usb_pcwd_driver); -} - - -module_init(usb_pcwd_init); -module_exit(usb_pcwd_exit); +module_usb_driver(usb_pcwd_driver); -- cgit v1.2.3