]> rtime.felk.cvut.cz Git - linux-imx.git/commitdiff
HID: holtek-mouse: use module_hid_driver() to simplify the code
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>
Wed, 29 May 2013 10:09:22 +0000 (18:09 +0800)
committerJiri Kosina <jkosina@suse.cz>
Wed, 29 May 2013 13:04:33 +0000 (15:04 +0200)
module_hid_driver() makes the code simpler by eliminating
boilerplate code.

Reported-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-holtek-mouse.c

index 6a23ee678138adaa579237a418b59dc16c02e8bf..7e6db3cf46f9eb39746fcc4ac4b4e29296caa569 100644 (file)
@@ -73,16 +73,5 @@ static struct hid_driver holtek_mouse_driver = {
        .report_fixup = holtek_mouse_report_fixup,
 };
 
-static int __init holtek_mouse_init(void)
-{
-       return hid_register_driver(&holtek_mouse_driver);
-}
-
-static void __exit holtek_mouse_exit(void)
-{
-       hid_unregister_driver(&holtek_mouse_driver);
-}
-
-module_exit(holtek_mouse_exit);
-module_init(holtek_mouse_init);
+module_hid_driver(holtek_mouse_driver);
 MODULE_LICENSE("GPL");