diff options
author | H Hartley Sweeten <hartleys@visionengravers.com> | 2012-12-17 17:28:26 -0500 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2013-01-03 04:27:31 -0500 |
commit | f425458eafd51b6b5ab64f407922e1198c567cb2 (patch) | |
tree | a597cc8f7ba8e878f7eb1decea211173adcd44e0 /drivers/hid/hid-magicmouse.c | |
parent | d463f4719a2fa883bc0bb1fb67e6fea2307aa6df (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.c | 19 |
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 | }; |
572 | module_hid_driver(magicmouse_driver); | ||
572 | 573 | ||
573 | static 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 | |||
584 | static void __exit magicmouse_exit(void) | ||
585 | { | ||
586 | hid_unregister_driver(&magicmouse_driver); | ||
587 | } | ||
588 | |||
589 | module_init(magicmouse_init); | ||
590 | module_exit(magicmouse_exit); | ||
591 | MODULE_LICENSE("GPL"); | 574 | MODULE_LICENSE("GPL"); |