Commit c0b20fd9 authored by Wei Yongjun's avatar Wei Yongjun Committed by Jiri Kosina

HID: use module_hid_driver() to simplify the code

module_hid_driver() makes the code simpler by eliminating
boilerplate code.
Signed-off-by: default avatarWei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
parent 8cd3c556
...@@ -57,16 +57,5 @@ static struct hid_driver xinmo_driver = { ...@@ -57,16 +57,5 @@ static struct hid_driver xinmo_driver = {
.event = xinmo_event .event = xinmo_event
}; };
static int __init xinmo_init(void) module_hid_driver(xinmo_driver);
{
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_LICENSE("GPL"); MODULE_LICENSE("GPL");
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment