Skip to content

Commit

Permalink
HID: holtek-mouse: use module_hid_driver() to simplify the code
Browse files Browse the repository at this point in the history
module_hid_driver() makes the code simpler by eliminating
boilerplate code.

Reported-by: Andy Shevchenko <[email protected]>
Signed-off-by: Wei Yongjun <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
  • Loading branch information
Wei Yongjun authored and Jiri Kosina committed May 29, 2013
1 parent 40d3597 commit c99f818
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions drivers/hid/hid-holtek-mouse.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");

0 comments on commit c99f818

Please sign in to comment.