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>
This commit is contained in:
parent
8cd3c556b5
commit
c0b20fd9b6
1 changed files with 1 additions and 12 deletions
|
@ -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");
|
||||
|
|
Loading…
Reference in a new issue