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>
This commit is contained in:
parent
40d3597fc9
commit
c99f818878
1 changed files with 1 additions and 12 deletions
|
@ -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");
|
||||
|
|
Loading…
Reference in a new issue