diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2011-11-18 18:49:34 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-11-18 18:49:34 +0100 |
commit | 42f06a13445bffae96c5e42fdd721ef65fed6abf (patch) | |
tree | cd0844fdf0cb755b59a9d30a7216d829114a1f81 /drivers/hid/usbhid/usbkbd.c | |
parent | USB: convert drivers/input/* to use module_usb_driver() (diff) | |
download | linux-42f06a13445bffae96c5e42fdd721ef65fed6abf.tar.xz linux-42f06a13445bffae96c5e42fdd721ef65fed6abf.zip |
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 <jkosina@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/hid/usbhid/usbkbd.c')
-rw-r--r-- | drivers/hid/usbhid/usbkbd.c | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/drivers/hid/usbhid/usbkbd.c b/drivers/hid/usbhid/usbkbd.c index 065817329f03..bc445d7e3bf5 100644 --- a/drivers/hid/usbhid/usbkbd.c +++ b/drivers/hid/usbhid/usbkbd.c @@ -354,19 +354,4 @@ static struct usb_driver usb_kbd_driver = { .id_table = usb_kbd_id_table, }; -static int __init usb_kbd_init(void) -{ - int result = usb_register(&usb_kbd_driver); - if (result == 0) - printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION ":" - DRIVER_DESC "\n"); - return result; -} - -static void __exit usb_kbd_exit(void) -{ - usb_deregister(&usb_kbd_driver); -} - -module_init(usb_kbd_init); -module_exit(usb_kbd_exit); +module_usb_driver(usb_kbd_driver); |