Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

HID: holtek-mouse: use module_hid_driver() to simplify the code

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>

authored by

Wei Yongjun and committed by
Jiri Kosina
c99f8188 40d3597f

+1 -12
+1 -12
drivers/hid/hid-holtek-mouse.c
··· 73 73 .report_fixup = holtek_mouse_report_fixup, 74 74 }; 75 75 76 - static int __init holtek_mouse_init(void) 77 - { 78 - return hid_register_driver(&holtek_mouse_driver); 79 - } 80 - 81 - static void __exit holtek_mouse_exit(void) 82 - { 83 - hid_unregister_driver(&holtek_mouse_driver); 84 - } 85 - 86 - module_exit(holtek_mouse_exit); 87 - module_init(holtek_mouse_init); 76 + module_hid_driver(holtek_mouse_driver); 88 77 MODULE_LICENSE("GPL");