HID: Use module_hid_driver macro
authorH Hartley Sweeten <hartleys@visionengravers.com>
Mon, 17 Dec 2012 22:28:26 +0000 (15:28 -0700)
committerJiri Kosina <jkosina@suse.cz>
Thu, 3 Jan 2013 09:27:31 +0000 (10:27 +0100)
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>
54 files changed:
drivers/hid/hid-a4tech.c
drivers/hid/hid-apple.c
drivers/hid/hid-aureal.c
drivers/hid/hid-axff.c
drivers/hid/hid-belkin.c
drivers/hid/hid-cherry.c
drivers/hid/hid-chicony.c
drivers/hid/hid-cypress.c
drivers/hid/hid-dr.c
drivers/hid/hid-elecom.c
drivers/hid/hid-emsff.c
drivers/hid/hid-ezkey.c
drivers/hid/hid-gaff.c
drivers/hid/hid-generic.c
drivers/hid/hid-gyration.c
drivers/hid/hid-holtek-kbd.c
drivers/hid/hid-holtekff.c
drivers/hid/hid-icade.c
drivers/hid/hid-kensington.c
drivers/hid/hid-keytouch.c
drivers/hid/hid-kye.c
drivers/hid/hid-lcpower.c
drivers/hid/hid-lenovo-tpkbd.c
drivers/hid/hid-lg.c
drivers/hid/hid-magicmouse.c
drivers/hid/hid-microsoft.c
drivers/hid/hid-monterey.c
drivers/hid/hid-multitouch.c
drivers/hid/hid-ntrig.c
drivers/hid/hid-ortek.c
drivers/hid/hid-petalynx.c
drivers/hid/hid-picolcd_core.c
drivers/hid/hid-pl.c
drivers/hid/hid-primax.c
drivers/hid/hid-prodikeys.c
drivers/hid/hid-ps3remote.c
drivers/hid/hid-roccat-lua.c
drivers/hid/hid-saitek.c
drivers/hid/hid-samsung.c
drivers/hid/hid-sensor-hub.c
drivers/hid/hid-sjoy.c
drivers/hid/hid-sony.c
drivers/hid/hid-speedlink.c
drivers/hid/hid-sunplus.c
drivers/hid/hid-tivo.c
drivers/hid/hid-tmff.c
drivers/hid/hid-topseed.c
drivers/hid/hid-twinhan.c
drivers/hid/hid-uclogic.c
drivers/hid/hid-wacom.c
drivers/hid/hid-waltop.c
drivers/hid/hid-wiimote-core.c
drivers/hid/hid-zpff.c
drivers/hid/hid-zydacron.c

index 0a239885e67cb77e8fd40564610dfb4afc06d8d9..7c5507e94820cc93b8867884dad993244431668a 100644 (file)
@@ -146,17 +146,6 @@ static struct hid_driver a4_driver = {
        .probe = a4_probe,
        .remove = a4_remove,
 };
+module_hid_driver(a4_driver);
 
-static int __init a4_init(void)
-{
-       return hid_register_driver(&a4_driver);
-}
-
-static void __exit a4_exit(void)
-{
-       hid_unregister_driver(&a4_driver);
-}
-
-module_init(a4_init);
-module_exit(a4_exit);
 MODULE_LICENSE("GPL");
index d0f7662aacca05caf3596c9edcc8280dfed675e6..320a958d4139ce57fc386087a93bffa23054d13f 100644 (file)
@@ -555,23 +555,6 @@ static struct hid_driver apple_driver = {
        .input_mapping = apple_input_mapping,
        .input_mapped = apple_input_mapped,
 };
+module_hid_driver(apple_driver);
 
-static int __init apple_init(void)
-{
-       int ret;
-
-       ret = hid_register_driver(&apple_driver);
-       if (ret)
-               pr_err("can't register apple driver\n");
-
-       return ret;
-}
-
-static void __exit apple_exit(void)
-{
-       hid_unregister_driver(&apple_driver);
-}
-
-module_init(apple_init);
-module_exit(apple_exit);
 MODULE_LICENSE("GPL");
index 7968187ddf7b8c5834f1a7aa2b0139de451ef82a..340ba9d394a09045949c0adc26dc4839c589a65f 100644 (file)
@@ -37,17 +37,6 @@ static struct hid_driver aureal_driver = {
        .id_table = aureal_devices,
        .report_fixup = aureal_report_fixup,
 };
+module_hid_driver(aureal_driver);
 
-static int __init aureal_init(void)
-{
-       return hid_register_driver(&aureal_driver);
-}
-
-static void __exit aureal_exit(void)
-{
-       hid_unregister_driver(&aureal_driver);
-}
-
-module_init(aureal_init);
-module_exit(aureal_exit);
 MODULE_LICENSE("GPL");
index 5be858dd9a158b004844a0a4ebc93351c1a58965..62f0cee032bada140bdcfcd84418c366c54c6015 100644 (file)
@@ -192,19 +192,7 @@ static struct hid_driver ax_driver = {
        .probe          = ax_probe,
        .remove         = ax_remove,
 };
-
-static int __init ax_init(void)
-{
-       return hid_register_driver(&ax_driver);
-}
-
-static void __exit ax_exit(void)
-{
-       hid_unregister_driver(&ax_driver);
-}
-
-module_init(ax_init);
-module_exit(ax_exit);
+module_hid_driver(ax_driver);
 
 MODULE_AUTHOR("Sergei Kolzun");
 MODULE_DESCRIPTION("Force feedback support for ACRUX game controllers");
index a1a5a12c3a6b9fc3e772e939908120389c069694..cc4cf138bef59fb02a8f316561b10a903975a735 100644 (file)
@@ -86,17 +86,6 @@ static struct hid_driver belkin_driver = {
        .input_mapping = belkin_input_mapping,
        .probe = belkin_probe,
 };
+module_hid_driver(belkin_driver);
 
-static int __init belkin_init(void)
-{
-       return hid_register_driver(&belkin_driver);
-}
-
-static void __exit belkin_exit(void)
-{
-       hid_unregister_driver(&belkin_driver);
-}
-
-module_init(belkin_init);
-module_exit(belkin_exit);
 MODULE_LICENSE("GPL");
index af034d3d925663200b8c08356a4e2e2c178e3892..1bdcccc54a1dda0e04d16fc9fbfe2d3d8e1e22b2 100644 (file)
@@ -69,17 +69,6 @@ static struct hid_driver ch_driver = {
        .report_fixup = ch_report_fixup,
        .input_mapping = ch_input_mapping,
 };
+module_hid_driver(ch_driver);
 
-static int __init ch_init(void)
-{
-       return hid_register_driver(&ch_driver);
-}
-
-static void __exit ch_exit(void)
-{
-       hid_unregister_driver(&ch_driver);
-}
-
-module_init(ch_init);
-module_exit(ch_exit);
 MODULE_LICENSE("GPL");
index a2abb8e15727dfd3f0e0d37734e95096ff8c9db8..b613d5a7968457b5719acaf57d9c0bc98b47ed29 100644 (file)
@@ -70,17 +70,6 @@ static struct hid_driver ch_driver = {
        .id_table = ch_devices,
        .input_mapping = ch_input_mapping,
 };
+module_hid_driver(ch_driver);
 
-static int __init ch_init(void)
-{
-       return hid_register_driver(&ch_driver);
-}
-
-static void __exit ch_exit(void)
-{
-       hid_unregister_driver(&ch_driver);
-}
-
-module_init(ch_init);
-module_exit(ch_exit);
 MODULE_LICENSE("GPL");
index 3e159a50dac724e1c974e32ea14b8a83e75153fb..c4ef3bc726e34e5e08aa947b64ddfa4dc7f772b0 100644 (file)
@@ -144,17 +144,6 @@ static struct hid_driver cp_driver = {
        .event = cp_event,
        .probe = cp_probe,
 };
+module_hid_driver(cp_driver);
 
-static int __init cp_init(void)
-{
-       return hid_register_driver(&cp_driver);
-}
-
-static void __exit cp_exit(void)
-{
-       hid_unregister_driver(&cp_driver);
-}
-
-module_init(cp_init);
-module_exit(cp_exit);
 MODULE_LICENSE("GPL");
index e832f44ae38391ae05ba88879d0b6189371d51dd..0fe8f65ef01a64c7d68155946498a28acbeaf63e 100644 (file)
@@ -297,17 +297,6 @@ static struct hid_driver dr_driver = {
        .report_fixup = dr_report_fixup,
        .probe = dr_probe,
 };
+module_hid_driver(dr_driver);
 
-static int __init dr_init(void)
-{
-       return hid_register_driver(&dr_driver);
-}
-
-static void __exit dr_exit(void)
-{
-       hid_unregister_driver(&dr_driver);
-}
-
-module_init(dr_init);
-module_exit(dr_exit);
 MODULE_LICENSE("GPL");
index 79d0c61e7214a0057ce03b781bb8b40c6cbaaf16..d0bd13b62dc2dc542868262a6c38ab6d1c47b8f1 100644 (file)
@@ -41,17 +41,6 @@ static struct hid_driver elecom_driver = {
        .id_table = elecom_devices,
        .report_fixup = elecom_report_fixup
 };
+module_hid_driver(elecom_driver);
 
-static int __init elecom_init(void)
-{
-       return hid_register_driver(&elecom_driver);
-}
-
-static void __exit elecom_exit(void)
-{
-       hid_unregister_driver(&elecom_driver);
-}
-
-module_init(elecom_init);
-module_exit(elecom_exit);
 MODULE_LICENSE("GPL");
index 2630d483d2623a08eaf357fe41bef4bd29b7aaf0..2e093ab99b435885c1f4d0ba5c6511ffe64993b9 100644 (file)
@@ -150,18 +150,7 @@ static struct hid_driver ems_driver = {
        .id_table = ems_devices,
        .probe = ems_probe,
 };
+module_hid_driver(ems_driver);
 
-static int ems_init(void)
-{
-       return hid_register_driver(&ems_driver);
-}
-
-static void ems_exit(void)
-{
-       hid_unregister_driver(&ems_driver);
-}
-
-module_init(ems_init);
-module_exit(ems_exit);
 MODULE_LICENSE("GPL");
 
index 6540af2871a79a345a818f5703d052fa9b0e65a0..212ac6be24512ae97592ee1d706d5085107dc854 100644 (file)
@@ -76,17 +76,6 @@ static struct hid_driver ez_driver = {
        .input_mapping = ez_input_mapping,
        .event = ez_event,
 };
+module_hid_driver(ez_driver);
 
-static int __init ez_init(void)
-{
-       return hid_register_driver(&ez_driver);
-}
-
-static void __exit ez_exit(void)
-{
-       hid_unregister_driver(&ez_driver);
-}
-
-module_init(ez_init);
-module_exit(ez_exit);
 MODULE_LICENSE("GPL");
index f1e1bcf674270d3f7c90cd41be3c21e50ff369a7..04d2e6aca77841983ba16bce0d1b312f2fb2e1bc 100644 (file)
@@ -176,17 +176,6 @@ static struct hid_driver ga_driver = {
        .id_table = ga_devices,
        .probe = ga_probe,
 };
+module_hid_driver(ga_driver);
 
-static int __init ga_init(void)
-{
-       return hid_register_driver(&ga_driver);
-}
-
-static void __exit ga_exit(void)
-{
-       hid_unregister_driver(&ga_driver);
-}
-
-module_init(ga_init);
-module_exit(ga_exit);
 MODULE_LICENSE("GPL");
index a8b3148e03a263bf4750be4ee803f6233ba304b9..e288a4a06fe89a5969dfd6bcf59b38fb673e1213 100644 (file)
@@ -34,19 +34,7 @@ static struct hid_driver hid_generic = {
        .name = "hid-generic",
        .id_table = hid_table,
 };
-
-static int __init hid_init(void)
-{
-       return hid_register_driver(&hid_generic);
-}
-
-static void __exit hid_exit(void)
-{
-       hid_unregister_driver(&hid_generic);
-}
-
-module_init(hid_init);
-module_exit(hid_exit);
+module_hid_driver(hid_generic);
 
 MODULE_AUTHOR("Henrik Rydberg");
 MODULE_DESCRIPTION("HID generic driver");
index 4442c30ef531d33182e4ad6461ad8f309727e99e..288d61c9748ecc5cfb00e419bb742582ce8a690a 100644 (file)
@@ -88,17 +88,6 @@ static struct hid_driver gyration_driver = {
        .input_mapping = gyration_input_mapping,
        .event = gyration_event,
 };
+module_hid_driver(gyration_driver);
 
-static int __init gyration_init(void)
-{
-       return hid_register_driver(&gyration_driver);
-}
-
-static void __exit gyration_exit(void)
-{
-       hid_unregister_driver(&gyration_driver);
-}
-
-module_init(gyration_init);
-module_exit(gyration_exit);
 MODULE_LICENSE("GPL");
index e0a5d1739fc38ae5707fc9deff77d8e62ffde958..6e1a4a4fc0c109f7bf60083963d8c239a10939cf 100644 (file)
@@ -167,17 +167,6 @@ static struct hid_driver holtek_kbd_driver = {
        .report_fixup = holtek_kbd_report_fixup,
        .probe = holtek_kbd_probe
 };
+module_hid_driver(holtek_kbd_driver);
 
-static int __init holtek_kbd_init(void)
-{
-       return hid_register_driver(&holtek_kbd_driver);
-}
-
-static void __exit holtek_kbd_exit(void)
-{
-       hid_unregister_driver(&holtek_kbd_driver);
-}
-
-module_exit(holtek_kbd_exit);
-module_init(holtek_kbd_init);
 MODULE_LICENSE("GPL");
index ff295e60059b25e8d49d3fa31881decda3b0014c..f34d1186a3e1b16b4604c5f057ab411cff1bcc2f 100644 (file)
@@ -224,17 +224,4 @@ static struct hid_driver holtek_driver = {
        .id_table = holtek_devices,
        .probe = holtek_probe,
 };
-
-static int __init holtek_init(void)
-{
-       return hid_register_driver(&holtek_driver);
-}
-
-static void __exit holtek_exit(void)
-{
-       hid_unregister_driver(&holtek_driver);
-}
-
-module_init(holtek_init);
-module_exit(holtek_exit);
-
+module_hid_driver(holtek_driver);
index 1d6565e37ba3d2e0cae21c79f1056525581575d9..09dcc04595f35c7798b68aed97fdf79f64947328 100644 (file)
@@ -235,25 +235,8 @@ static struct hid_driver icade_driver = {
        .input_mapped = icade_input_mapped,
        .input_mapping = icade_input_mapping,
 };
+module_hid_driver(icade_driver);
 
-static int __init icade_init(void)
-{
-       int ret;
-
-       ret = hid_register_driver(&icade_driver);
-       if (ret)
-               pr_err("can't register icade driver\n");
-
-       return ret;
-}
-
-static void __exit icade_exit(void)
-{
-       hid_unregister_driver(&icade_driver);
-}
-
-module_init(icade_init);
-module_exit(icade_exit);
 MODULE_LICENSE("GPL");
 MODULE_AUTHOR("Bastien Nocera <hadess@hadess.net>");
 MODULE_DESCRIPTION("ION iCade input driver");
index a5b4016e9bd7b54d34543048d9d7344bbb66704d..fe9a99dd8d0875bc7f0c42741acdb0c7fae0f4b2 100644 (file)
@@ -47,17 +47,6 @@ static struct hid_driver ks_driver = {
        .id_table = ks_devices,
        .input_mapping = ks_input_mapping,
 };
+module_hid_driver(ks_driver);
 
-static int __init ks_init(void)
-{
-       return hid_register_driver(&ks_driver);
-}
-
-static void __exit ks_exit(void)
-{
-       hid_unregister_driver(&ks_driver);
-}
-
-module_init(ks_init);
-module_exit(ks_exit);
 MODULE_LICENSE("GPL");
index 07cd825f6f018c9799e71dea19343a1012c2d17c..3074671b7d6abb3d6ba9ac335e97e6468888aa06 100644 (file)
@@ -49,18 +49,7 @@ static struct hid_driver keytouch_driver = {
        .id_table = keytouch_devices,
        .report_fixup = keytouch_report_fixup,
 };
+module_hid_driver(keytouch_driver);
 
-static int __init keytouch_init(void)
-{
-       return hid_register_driver(&keytouch_driver);
-}
-
-static void __exit keytouch_exit(void)
-{
-       hid_unregister_driver(&keytouch_driver);
-}
-
-module_init(keytouch_init);
-module_exit(keytouch_exit);
 MODULE_LICENSE("GPL");
 MODULE_AUTHOR("Jiri Kosina");
index b4f0d8216fd099bd69a2531600c02a241c42929f..ef72daecfa16337aa66b2a712d6c64457d4db777 100644 (file)
@@ -419,17 +419,6 @@ static struct hid_driver kye_driver = {
        .probe = kye_probe,
        .report_fixup = kye_report_fixup,
 };
+module_hid_driver(kye_driver);
 
-static int __init kye_init(void)
-{
-       return hid_register_driver(&kye_driver);
-}
-
-static void __exit kye_exit(void)
-{
-       hid_unregister_driver(&kye_driver);
-}
-
-module_init(kye_init);
-module_exit(kye_exit);
 MODULE_LICENSE("GPL");
index 22bc14abdfa3d23e0f187d0cf8eb2efb7cef223f..6424cfdb773708e51294644bece1b7e1fefe3216 100644 (file)
@@ -54,17 +54,6 @@ static struct hid_driver ts_driver = {
        .id_table = ts_devices,
        .input_mapping = ts_input_mapping,
 };
+module_hid_driver(ts_driver);
 
-static int __init ts_init(void)
-{
-       return hid_register_driver(&ts_driver);
-}
-
-static void __exit ts_exit(void)
-{
-       hid_unregister_driver(&ts_driver);
-}
-
-module_init(ts_init);
-module_exit(ts_exit);
 MODULE_LICENSE("GPL");
index cea016e94f43e336ec1a4d73eb2cbbdba9e1ace7..956c3b135f64fe61e4a4636e2e81e911ad3ee141 100644 (file)
@@ -468,18 +468,6 @@ static struct hid_driver tpkbd_driver = {
        .probe = tpkbd_probe,
        .remove = tpkbd_remove,
 };
-
-static int __init tpkbd_init(void)
-{
-       return hid_register_driver(&tpkbd_driver);
-}
-
-static void __exit tpkbd_exit(void)
-{
-       hid_unregister_driver(&tpkbd_driver);
-}
-
-module_init(tpkbd_init);
-module_exit(tpkbd_exit);
+module_hid_driver(tpkbd_driver);
 
 MODULE_LICENSE("GPL");
index a2f8e88b9fa2503ed1a6a1dcb63f92f38372bc80..e3dc73b612de6bb41f45e662c247d72921f04ed5 100644 (file)
@@ -503,17 +503,6 @@ static struct hid_driver lg_driver = {
        .probe = lg_probe,
        .remove = lg_remove,
 };
+module_hid_driver(lg_driver);
 
-static int __init lg_init(void)
-{
-       return hid_register_driver(&lg_driver);
-}
-
-static void __exit lg_exit(void)
-{
-       hid_unregister_driver(&lg_driver);
-}
-
-module_init(lg_init);
-module_exit(lg_exit);
 MODULE_LICENSE("GPL");
index 25ddf3e3aec641fd4d883843e87e59bc0e3b0c51..f7f113ba083eb43fb1073d189a4979f7d4d6d724 100644 (file)
@@ -569,23 +569,6 @@ static struct hid_driver magicmouse_driver = {
        .raw_event = magicmouse_raw_event,
        .input_mapping = magicmouse_input_mapping,
 };
+module_hid_driver(magicmouse_driver);
 
-static int __init magicmouse_init(void)
-{
-       int ret;
-
-       ret = hid_register_driver(&magicmouse_driver);
-       if (ret)
-               pr_err("can't register magicmouse driver\n");
-
-       return ret;
-}
-
-static void __exit magicmouse_exit(void)
-{
-       hid_unregister_driver(&magicmouse_driver);
-}
-
-module_init(magicmouse_init);
-module_exit(magicmouse_exit);
 MODULE_LICENSE("GPL");
index 6fcd466d082512f675d027aafd7600eb34edebaf..29d27f65a1184b55cf40c8ca3c0940a5548d8324 100644 (file)
@@ -221,17 +221,6 @@ static struct hid_driver ms_driver = {
        .event = ms_event,
        .probe = ms_probe,
 };
+module_hid_driver(ms_driver);
 
-static int __init ms_init(void)
-{
-       return hid_register_driver(&ms_driver);
-}
-
-static void __exit ms_exit(void)
-{
-       hid_unregister_driver(&ms_driver);
-}
-
-module_init(ms_init);
-module_exit(ms_exit);
 MODULE_LICENSE("GPL");
index cd3643e06fa657f4735b3f1e76a6fd95d59549ed..9e14c00eb1b6bb105ffd1326dc802183cfeb9a1a 100644 (file)
@@ -63,17 +63,6 @@ static struct hid_driver mr_driver = {
        .report_fixup = mr_report_fixup,
        .input_mapping = mr_input_mapping,
 };
+module_hid_driver(mr_driver);
 
-static int __init mr_init(void)
-{
-       return hid_register_driver(&mr_driver);
-}
-
-static void __exit mr_exit(void)
-{
-       hid_unregister_driver(&mr_driver);
-}
-
-module_init(mr_init);
-module_exit(mr_exit);
 MODULE_LICENSE("GPL");
index 61543c02ea0baf42c58fbfa5518dba229cb22901..46d8136daf99f0ce312ce89394795e48ff02d15c 100644 (file)
@@ -1198,16 +1198,4 @@ static struct hid_driver mt_driver = {
        .resume = mt_resume,
 #endif
 };
-
-static int __init mt_init(void)
-{
-       return hid_register_driver(&mt_driver);
-}
-
-static void __exit mt_exit(void)
-{
-       hid_unregister_driver(&mt_driver);
-}
-
-module_init(mt_init);
-module_exit(mt_exit);
+module_hid_driver(mt_driver);
index 86a969f6329297f9b34c9866b1bb39c5a0c85638..2ffc0e3844c7f667f181902d23f5709a6851357f 100644 (file)
@@ -1026,17 +1026,6 @@ static struct hid_driver ntrig_driver = {
        .usage_table = ntrig_grabbed_usages,
        .event = ntrig_event,
 };
+module_hid_driver(ntrig_driver);
 
-static int __init ntrig_init(void)
-{
-       return hid_register_driver(&ntrig_driver);
-}
-
-static void __exit ntrig_exit(void)
-{
-       hid_unregister_driver(&ntrig_driver);
-}
-
-module_init(ntrig_init);
-module_exit(ntrig_exit);
 MODULE_LICENSE("GPL");
index 0ffa1d2d64f0b8fe0c8e9931b6afc86ddd866397..6620f15fec228a21ccf6f1b12a5e7dfd7b73046d 100644 (file)
@@ -50,17 +50,6 @@ static struct hid_driver ortek_driver = {
        .id_table = ortek_devices,
        .report_fixup = ortek_report_fixup
 };
+module_hid_driver(ortek_driver);
 
-static int __init ortek_init(void)
-{
-       return hid_register_driver(&ortek_driver);
-}
-
-static void __exit ortek_exit(void)
-{
-       hid_unregister_driver(&ortek_driver);
-}
-
-module_init(ortek_init);
-module_exit(ortek_exit);
 MODULE_LICENSE("GPL");
index 4c521de4e7e646f913e2db76fc76645ecc56771a..736b2502df4f8b00473889f6abf0ac78dcf72fe3 100644 (file)
@@ -103,17 +103,6 @@ static struct hid_driver pl_driver = {
        .input_mapping = pl_input_mapping,
        .probe = pl_probe,
 };
+module_hid_driver(pl_driver);
 
-static int __init pl_init(void)
-{
-       return hid_register_driver(&pl_driver);
-}
-
-static void __exit pl_exit(void)
-{
-       hid_unregister_driver(&pl_driver);
-}
-
-module_init(pl_init);
-module_exit(pl_exit);
 MODULE_LICENSE("GPL");
index 86df26e58abac65f671601b70f15085faa4fdece..31cd93fc3d4bff26fb0275d102c90270483289e7 100644 (file)
@@ -672,18 +672,7 @@ static struct hid_driver picolcd_driver = {
        .reset_resume =  picolcd_reset_resume,
 #endif
 };
+module_hid_driver(picolcd_driver);
 
-static int __init picolcd_init(void)
-{
-       return hid_register_driver(&picolcd_driver);
-}
-
-static void __exit picolcd_exit(void)
-{
-       hid_unregister_driver(&picolcd_driver);
-}
-
-module_init(picolcd_init);
-module_exit(picolcd_exit);
 MODULE_DESCRIPTION("Minibox graphics PicoLCD Driver");
 MODULE_LICENSE("GPL v2");
index 47ed74c46b6be73f8ce2001265dc783f21bc4ed9..123977e5aeee6d5023c18bc755506259ff8e62ae 100644 (file)
@@ -216,17 +216,6 @@ static struct hid_driver pl_driver = {
        .id_table = pl_devices,
        .probe = pl_probe,
 };
+module_hid_driver(pl_driver);
 
-static int __init pl_init(void)
-{
-       return hid_register_driver(&pl_driver);
-}
-
-static void __exit pl_exit(void)
-{
-       hid_unregister_driver(&pl_driver);
-}
-
-module_init(pl_init);
-module_exit(pl_exit);
 MODULE_LICENSE("GPL");
index c15adb0c98a1d9a74475988360bc0182f63462e6..3a1c3c4c50dce62d1032ffe682aa66a849111171 100644 (file)
@@ -75,18 +75,7 @@ static struct hid_driver px_driver = {
        .id_table = px_devices,
        .raw_event = px_raw_event,
 };
+module_hid_driver(px_driver);
 
-static int __init px_init(void)
-{
-       return hid_register_driver(&px_driver);
-}
-
-static void __exit px_exit(void)
-{
-       hid_unregister_driver(&px_driver);
-}
-
-module_init(px_init);
-module_exit(px_exit);
 MODULE_AUTHOR("Terry Lambert <tlambert@google.com>");
 MODULE_LICENSE("GPL");
index ec8ca3336315ecd373a5eecdad4da847fa46c01f..4e1c4bcbdc039763ce170dbb7913bd56fd003d4d 100644 (file)
@@ -889,23 +889,6 @@ static struct hid_driver pk_driver = {
        .probe = pk_probe,
        .remove = pk_remove,
 };
+module_hid_driver(pk_driver);
 
-static int pk_init(void)
-{
-       int ret;
-
-       ret = hid_register_driver(&pk_driver);
-       if (ret)
-               pr_err("can't register prodikeys driver\n");
-
-       return ret;
-}
-
-static void pk_exit(void)
-{
-       hid_unregister_driver(&pk_driver);
-}
-
-module_init(pk_init);
-module_exit(pk_exit);
 MODULE_LICENSE("GPL");
index 03811e539d71db9187ac4124e7b9027aca94a6bf..f1239d3c5b140d27eee9b64587fbc36fcee3e331 100644 (file)
@@ -198,18 +198,7 @@ static struct hid_driver ps3remote_driver = {
        .report_fixup  = ps3remote_fixup,
        .input_mapping = ps3remote_mapping,
 };
+module_hid_driver(ps3remote_driver);
 
-static int __init ps3remote_init(void)
-{
-       return hid_register_driver(&ps3remote_driver);
-}
-
-static void __exit ps3remote_exit(void)
-{
-       hid_unregister_driver(&ps3remote_driver);
-}
-
-module_init(ps3remote_init);
-module_exit(ps3remote_exit);
 MODULE_LICENSE("GPL");
 MODULE_AUTHOR("David Dillow <dave@thedillows.org>, Antonio Ospite <ospite@studenti.unina.it>");
index 5084fb4b7e91ac3921a2c78edfb94684d9eedd45..6adc0fa08d96fc57fcb6d078ca9ca18c08415801 100644 (file)
@@ -208,19 +208,7 @@ static struct hid_driver lua_driver = {
                .probe = lua_probe,
                .remove = lua_remove
 };
-
-static int __init lua_init(void)
-{
-       return hid_register_driver(&lua_driver);
-}
-
-static void __exit lua_exit(void)
-{
-       hid_unregister_driver(&lua_driver);
-}
-
-module_init(lua_init);
-module_exit(lua_exit);
+module_hid_driver(lua_driver);
 
 MODULE_AUTHOR("Stefan Achatz");
 MODULE_DESCRIPTION("USB Roccat Lua driver");
index 45aea77bb611fda8dc07a0a3c4759dd54e783032..37961c7e397d8a0dcbdb1bcd0409a2defe33bd4c 100644 (file)
@@ -54,17 +54,6 @@ static struct hid_driver saitek_driver = {
        .id_table = saitek_devices,
        .report_fixup = saitek_report_fixup
 };
+module_hid_driver(saitek_driver);
 
-static int __init saitek_init(void)
-{
-       return hid_register_driver(&saitek_driver);
-}
-
-static void __exit saitek_exit(void)
-{
-       hid_unregister_driver(&saitek_driver);
-}
-
-module_init(saitek_init);
-module_exit(saitek_exit);
 MODULE_LICENSE("GPL");
index a5821d31722932a1df634343421b562f05d93d20..7cbb067d4a9e399f62b57b54830d384956037cbc 100644 (file)
@@ -196,17 +196,6 @@ static struct hid_driver samsung_driver = {
        .input_mapping = samsung_input_mapping,
        .probe = samsung_probe,
 };
+module_hid_driver(samsung_driver);
 
-static int __init samsung_init(void)
-{
-       return hid_register_driver(&samsung_driver);
-}
-
-static void __exit samsung_exit(void)
-{
-       hid_unregister_driver(&samsung_driver);
-}
-
-module_init(samsung_init);
-module_exit(samsung_exit);
 MODULE_LICENSE("GPL");
index 0bc58bd8d4f5a9e496187310326aff7e031e74f0..4179f5e91e6819ec6ccf22c41c0a8964e8c8986a 100644 (file)
@@ -627,19 +627,7 @@ static struct hid_driver sensor_hub_driver = {
        .reset_resume =  sensor_hub_reset_resume,
 #endif
 };
-
-static int __init sensor_hub_init(void)
-{
-       return hid_register_driver(&sensor_hub_driver);
-}
-
-static void __exit sensor_hub_exit(void)
-{
-       hid_unregister_driver(&sensor_hub_driver);
-}
-
-module_init(sensor_hub_init);
-module_exit(sensor_hub_exit);
+module_hid_driver(sensor_hub_driver);
 
 MODULE_DESCRIPTION("HID Sensor Hub driver");
 MODULE_AUTHOR("Srinivas Pandruvada <srinivas.pandruvada@intel.com>");
index 42257acfeb73fba84c2912db29f337a63ab0c706..28f774003f0381a97c58df8ab44ad11393a14d91 100644 (file)
@@ -177,19 +177,8 @@ static struct hid_driver sjoy_driver = {
        .id_table = sjoy_devices,
        .probe = sjoy_probe,
 };
+module_hid_driver(sjoy_driver);
 
-static int __init sjoy_init(void)
-{
-       return hid_register_driver(&sjoy_driver);
-}
-
-static void __exit sjoy_exit(void)
-{
-       hid_unregister_driver(&sjoy_driver);
-}
-
-module_init(sjoy_init);
-module_exit(sjoy_exit);
 MODULE_LICENSE("GPL");
 MODULE_AUTHOR("Jussi Kivilinna");
 
index 7f33ebf299c220fae74806f2d3aa44dd73c2507a..23fc762e8633e06a4298fb9bb06d1439a4046a49 100644 (file)
@@ -229,17 +229,6 @@ static struct hid_driver sony_driver = {
        .report_fixup = sony_report_fixup,
        .raw_event = sony_raw_event
 };
+module_hid_driver(sony_driver);
 
-static int __init sony_init(void)
-{
-       return hid_register_driver(&sony_driver);
-}
-
-static void __exit sony_exit(void)
-{
-       hid_unregister_driver(&sony_driver);
-}
-
-module_init(sony_init);
-module_exit(sony_exit);
 MODULE_LICENSE("GPL");
index 602013741718c7c420759cc0f885a34318d9aa77..e94371a059cb3b65f53580d83f5dc40e51ee493c 100644 (file)
@@ -73,17 +73,6 @@ static struct hid_driver speedlink_driver = {
        .input_mapping = speedlink_input_mapping,
        .event = speedlink_event,
 };
+module_hid_driver(speedlink_driver);
 
-static int __init speedlink_init(void)
-{
-       return hid_register_driver(&speedlink_driver);
-}
-
-static void __exit speedlink_exit(void)
-{
-       hid_unregister_driver(&speedlink_driver);
-}
-
-module_init(speedlink_init);
-module_exit(speedlink_exit);
 MODULE_LICENSE("GPL");
index 45b4b066a2621dced695d55d7fd79462de4c5f0a..87fc91e1c8de4980d2f8e8721f476b6d21959adf 100644 (file)
@@ -63,17 +63,6 @@ static struct hid_driver sp_driver = {
        .report_fixup = sp_report_fixup,
        .input_mapping = sp_input_mapping,
 };
+module_hid_driver(sp_driver);
 
-static int __init sp_init(void)
-{
-       return hid_register_driver(&sp_driver);
-}
-
-static void __exit sp_exit(void)
-{
-       hid_unregister_driver(&sp_driver);
-}
-
-module_init(sp_init);
-module_exit(sp_exit);
 MODULE_LICENSE("GPL");
index 9f85f827607fd6fca72b03152ca7a51b061ec82c..d790d8d71f7fc6829f405b7665cc37f0af1bf5a8 100644 (file)
@@ -73,18 +73,7 @@ static struct hid_driver tivo_driver = {
        .id_table = tivo_devices,
        .input_mapping = tivo_input_mapping,
 };
+module_hid_driver(tivo_driver);
 
-static int __init tivo_init(void)
-{
-       return hid_register_driver(&tivo_driver);
-}
-
-static void __exit tivo_exit(void)
-{
-       hid_unregister_driver(&tivo_driver);
-}
-
-module_init(tivo_init);
-module_exit(tivo_exit);
 MODULE_LICENSE("GPL");
 MODULE_AUTHOR("Jarod Wilson <jarod@redhat.com>");
index 83a933b9c2e98163004c7c6dc999133196375840..e4fcf3f702a519b95fdc9ca8ea73d1d80a777c42 100644 (file)
@@ -261,17 +261,6 @@ static struct hid_driver tm_driver = {
        .id_table = tm_devices,
        .probe = tm_probe,
 };
+module_hid_driver(tm_driver);
 
-static int __init tm_init(void)
-{
-       return hid_register_driver(&tm_driver);
-}
-
-static void __exit tm_exit(void)
-{
-       hid_unregister_driver(&tm_driver);
-}
-
-module_init(tm_init);
-module_exit(tm_exit);
 MODULE_LICENSE("GPL");
index 613ff7b1d746a0d51d56dca6e17e2cc2e0e1e7dc..8a5b843e9dd6f904618ff790c872d48ff07a2aea 100644 (file)
@@ -76,17 +76,6 @@ static struct hid_driver ts_driver = {
        .id_table = ts_devices,
        .input_mapping = ts_input_mapping,
 };
+module_hid_driver(ts_driver);
 
-static int __init ts_init(void)
-{
-       return hid_register_driver(&ts_driver);
-}
-
-static void __exit ts_exit(void)
-{
-       hid_unregister_driver(&ts_driver);
-}
-
-module_init(ts_init);
-module_exit(ts_exit);
 MODULE_LICENSE("GPL");
index f23456b1fd4b6ff204f4d2077bbbc2700902942d..c08c36443f833dc5aa7e11385e628dc4e385fcf0 100644 (file)
@@ -131,17 +131,6 @@ static struct hid_driver twinhan_driver = {
        .id_table = twinhan_devices,
        .input_mapping = twinhan_input_mapping,
 };
+module_hid_driver(twinhan_driver);
 
-static int __init twinhan_init(void)
-{
-       return hid_register_driver(&twinhan_driver);
-}
-
-static void __exit twinhan_exit(void)
-{
-       hid_unregister_driver(&twinhan_driver);
-}
-
-module_init(twinhan_init);
-module_exit(twinhan_exit);
 MODULE_LICENSE("GPL");
index 2e56a1fd2375ea2f73fb35ef109b077d989a0d58..fb8b516ff0ed5f7693912ece34c4ff372d3918fa 100644 (file)
@@ -650,17 +650,6 @@ static struct hid_driver uclogic_driver = {
        .id_table = uclogic_devices,
        .report_fixup = uclogic_report_fixup,
 };
+module_hid_driver(uclogic_driver);
 
-static int __init uclogic_init(void)
-{
-       return hid_register_driver(&uclogic_driver);
-}
-
-static void __exit uclogic_exit(void)
-{
-       hid_unregister_driver(&uclogic_driver);
-}
-
-module_init(uclogic_init);
-module_exit(uclogic_exit);
 MODULE_LICENSE("GPL");
index 2f60da9ed066539a5b4c2e479118ec0763a1b9f0..a4a8bb0da688199e9f19a3bcc8e5d0737d5bdb27 100644 (file)
@@ -953,23 +953,7 @@ static struct hid_driver wacom_driver = {
        .raw_event = wacom_raw_event,
        .input_mapped = wacom_input_mapped,
 };
+module_hid_driver(wacom_driver);
 
-static int __init wacom_init(void)
-{
-       int ret;
-
-       ret = hid_register_driver(&wacom_driver);
-       if (ret)
-               pr_err("can't register wacom driver\n");
-       return ret;
-}
-
-static void __exit wacom_exit(void)
-{
-       hid_unregister_driver(&wacom_driver);
-}
-
-module_init(wacom_init);
-module_exit(wacom_exit);
 MODULE_DESCRIPTION("Driver for Wacom Graphire Bluetooth and Wacom Intuos4 WL");
 MODULE_LICENSE("GPL");
index bb536ab5941e413a7cbb624ef019d73aec847197..059931d7b3922ff064ea0f59b63f2d9b8d9ff745 100644 (file)
@@ -779,17 +779,6 @@ static struct hid_driver waltop_driver = {
        .report_fixup = waltop_report_fixup,
        .raw_event = waltop_raw_event,
 };
+module_hid_driver(waltop_driver);
 
-static int __init waltop_init(void)
-{
-       return hid_register_driver(&waltop_driver);
-}
-
-static void __exit waltop_exit(void)
-{
-       hid_unregister_driver(&waltop_driver);
-}
-
-module_init(waltop_init);
-module_exit(waltop_exit);
 MODULE_LICENSE("GPL");
index 84e2fbec5fbb8ecb84c5139766caafdcc8cc53af..0fb8ab93db68e275091a49462bd0bd40a356dded 100644 (file)
@@ -1294,25 +1294,8 @@ static struct hid_driver wiimote_hid_driver = {
        .remove = wiimote_hid_remove,
        .raw_event = wiimote_hid_event,
 };
+module_hid_driver(wiimote_hid_driver);
 
-static int __init wiimote_init(void)
-{
-       int ret;
-
-       ret = hid_register_driver(&wiimote_hid_driver);
-       if (ret)
-               pr_err("Can't register wiimote hid driver\n");
-
-       return ret;
-}
-
-static void __exit wiimote_exit(void)
-{
-       hid_unregister_driver(&wiimote_hid_driver);
-}
-
-module_init(wiimote_init);
-module_exit(wiimote_exit);
 MODULE_LICENSE("GPL");
 MODULE_AUTHOR("David Herrmann <dh.herrmann@gmail.com>");
 MODULE_DESCRIPTION(WIIMOTE_NAME " Device Driver");
index f6ba81df71bdedfe7b721c7e12970992fb1c53b0..af66452592e963c8a5e91f17921e166e50699800 100644 (file)
@@ -152,17 +152,6 @@ static struct hid_driver zp_driver = {
        .id_table = zp_devices,
        .probe = zp_probe,
 };
+module_hid_driver(zp_driver);
 
-static int __init zp_init(void)
-{
-       return hid_register_driver(&zp_driver);
-}
-
-static void __exit zp_exit(void)
-{
-       hid_unregister_driver(&zp_driver);
-}
-
-module_init(zp_init);
-module_exit(zp_exit);
 MODULE_LICENSE("GPL");
index 1ad85f2257b4b46d4c48cd49f883fa95634c17e7..e4cddeccd6b51691bffc955a62569ead5e6d480e 100644 (file)
@@ -219,17 +219,6 @@ static struct hid_driver zc_driver = {
        .probe = zc_probe,
        .remove = zc_remove,
 };
+module_hid_driver(zc_driver);
 
-static int __init zc_init(void)
-{
-       return hid_register_driver(&zc_driver);
-}
-
-static void __exit zc_exit(void)
-{
-       hid_unregister_driver(&zc_driver);
-}
-
-module_init(zc_init);
-module_exit(zc_exit);
 MODULE_LICENSE("GPL");