[PATCH -next] HID: holtek-mouse: use module_hid_driver() to simplify the code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Wei Yongjun <yongjun_wei@xxxxxxxxxxxxxxxxx>

module_hid_driver() makes the code simpler by eliminating
boilerplate code.

Signed-off-by: Wei Yongjun <yongjun_wei@xxxxxxxxxxxxxxxxx>
---
 drivers/hid/hid-holtek-mouse.c | 13 +------------
 1 file changed, 1 insertion(+), 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");

--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux