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:
Wei Yongjun 2013-05-29 18:09:22 +08:00 committed by Jiri Kosina
parent 40d3597fc9
commit c99f818878
1 changed files with 1 additions and 12 deletions

View 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");