summaryrefslogtreecommitdiffstats
path: root/drivers/hid
diff options
context:
space:
mode:
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>2013-05-29 18:09:22 +0800
committerJiri Kosina <jkosina@suse.cz>2013-05-29 15:04:33 +0200
commitc99f81887850cb593ea02bd14a68062547db8261 (patch)
treeccf1718cfddb64756badb5527a6a55a6e8fc3cc5 /drivers/hid
parent40d3597fc988dbe3bc902c501f88a73391c7da0d (diff)
downloadop-kernel-dev-c99f81887850cb593ea02bd14a68062547db8261.zip
op-kernel-dev-c99f81887850cb593ea02bd14a68062547db8261.tar.gz
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>
Diffstat (limited to 'drivers/hid')
-rw-r--r--drivers/hid/hid-holtek-mouse.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/drivers/hid/hid-holtek-mouse.c b/drivers/hid/hid-holtek-mouse.c
index 6a23ee6..7e6db3c 100644
--- a/drivers/hid/hid-holtek-mouse.c
+++ b/drivers/hid/hid-holtek-mouse.c
@@ -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");
OpenPOWER on IntegriCloud