aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hid/hid-magicmouse.c
diff options
context:
space:
mode:
authorH Hartley Sweeten <hartleys@visionengravers.com>2012-12-17 17:28:26 -0500
committerJiri Kosina <jkosina@suse.cz>2013-01-03 04:27:31 -0500
commitf425458eafd51b6b5ab64f407922e1198c567cb2 (patch)
treea597cc8f7ba8e878f7eb1decea211173adcd44e0 /drivers/hid/hid-magicmouse.c
parentd463f4719a2fa883bc0bb1fb67e6fea2307aa6df (diff)
HID: Use module_hid_driver macro
Use the new module_hid_driver macro in all HID drivers that have a simple register/unregister init/exit. This also converts the hid drivers that test for a failure of hid_register_driver() and report the failure. Using module_hid_driver in those drivers removes the failure message. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/hid-magicmouse.c')
-rw-r--r--drivers/hid/hid-magicmouse.c19
1 files changed, 1 insertions, 18 deletions
diff --git a/drivers/hid/hid-magicmouse.c b/drivers/hid/hid-magicmouse.c
index 25ddf3e3aec6..f7f113ba083e 100644
--- a/drivers/hid/hid-magicmouse.c
+++ b/drivers/hid/hid-magicmouse.c
@@ -569,23 +569,6 @@ static struct hid_driver magicmouse_driver = {
569 .raw_event = magicmouse_raw_event, 569 .raw_event = magicmouse_raw_event,
570 .input_mapping = magicmouse_input_mapping, 570 .input_mapping = magicmouse_input_mapping,
571}; 571};
572module_hid_driver(magicmouse_driver);
572 573
573static int __init magicmouse_init(void)
574{
575 int ret;
576
577 ret = hid_register_driver(&magicmouse_driver);
578 if (ret)
579 pr_err("can't register magicmouse driver\n");
580
581 return ret;
582}
583
584static void __exit magicmouse_exit(void)
585{
586 hid_unregister_driver(&magicmouse_driver);
587}
588
589module_init(magicmouse_init);
590module_exit(magicmouse_exit);
591MODULE_LICENSE("GPL"); 574MODULE_LICENSE("GPL");