From 42f06a13445bffae96c5e42fdd721ef65fed6abf Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Fri, 18 Nov 2011 09:49:34 -0800 Subject: USB: convert drivers/hid/* to use module_usb_driver() This converts the drivers in drivers/hid/* 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: Jiri Kosina Signed-off-by: Greg Kroah-Hartman --- drivers/hid/usbhid/usbmouse.c | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) (limited to 'drivers/hid/usbhid/usbmouse.c') diff --git a/drivers/hid/usbhid/usbmouse.c b/drivers/hid/usbhid/usbmouse.c index 79b2bf81a059..0f6be45d43d5 100644 --- a/drivers/hid/usbhid/usbmouse.c +++ b/drivers/hid/usbhid/usbmouse.c @@ -241,19 +241,4 @@ static struct usb_driver usb_mouse_driver = { .id_table = usb_mouse_id_table, }; -static int __init usb_mouse_init(void) -{ - int retval = usb_register(&usb_mouse_driver); - if (retval == 0) - printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION ":" - DRIVER_DESC "\n"); - return retval; -} - -static void __exit usb_mouse_exit(void) -{ - usb_deregister(&usb_mouse_driver); -} - -module_init(usb_mouse_init); -module_exit(usb_mouse_exit); +module_usb_driver(usb_mouse_driver); -- cgit v1.2.1