aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hid/hid-xinmo.c
diff options
context:
space:
mode:
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>2013-08-23 11:06:19 +0800
committerJiri Kosina <jkosina@suse.cz>2013-08-26 13:23:04 +0200
commitc0b20fd9b67a57327074726c60640a957dab91e3 (patch)
tree1960fbb4bdc9fbdacb060cc99906f4f9de75e9dd /drivers/hid/hid-xinmo.c
parentHID: samples/hidraw: add .gitignore file (diff)
downloadlinux-dev-c0b20fd9b67a57327074726c60640a957dab91e3.tar.xz
linux-dev-c0b20fd9b67a57327074726c60640a957dab91e3.zip
HID: use module_hid_driver() to simplify the code
module_hid_driver() makes the code simpler by eliminating boilerplate code. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/hid-xinmo.c')
-rw-r--r--drivers/hid/hid-xinmo.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/drivers/hid/hid-xinmo.c b/drivers/hid/hid-xinmo.c
index 6153e50d9721..7df5227a7e61 100644
--- a/drivers/hid/hid-xinmo.c
+++ b/drivers/hid/hid-xinmo.c
@@ -57,16 +57,5 @@ static struct hid_driver xinmo_driver = {
.event = xinmo_event
};
-static int __init xinmo_init(void)
-{
- return hid_register_driver(&xinmo_driver);
-}
-
-static void __exit xinmo_exit(void)
-{
- hid_unregister_driver(&xinmo_driver);
-}
-
-module_init(xinmo_init);
-module_exit(xinmo_exit);
+module_hid_driver(xinmo_driver);
MODULE_LICENSE("GPL");