Input: serio - use module_serio_driver
authorAxel Lin <axel.lin@gmail.com>
Wed, 4 Apr 2012 06:50:17 +0000 (23:50 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Wed, 4 Apr 2012 16:25:43 +0000 (09:25 -0700)
This patch converts the drivers in drivers/input/* to use
module_serio_driver() macro which makes the code smaller and
a bit simpler.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
31 files changed:
drivers/input/joystick/magellan.c
drivers/input/joystick/spaceball.c
drivers/input/joystick/spaceorb.c
drivers/input/joystick/stinger.c
drivers/input/joystick/twidjoy.c
drivers/input/joystick/warrior.c
drivers/input/joystick/zhenhua.c
drivers/input/keyboard/hil_kbd.c
drivers/input/keyboard/lkkbd.c
drivers/input/keyboard/newtonkbd.c
drivers/input/keyboard/stowaway.c
drivers/input/keyboard/sunkbd.c
drivers/input/keyboard/xtkbd.c
drivers/input/mouse/sermouse.c
drivers/input/mouse/vsxxxaa.c
drivers/input/serio/ps2mult.c
drivers/input/serio/serio_raw.c
drivers/input/touchscreen/dynapro.c
drivers/input/touchscreen/elo.c
drivers/input/touchscreen/fujitsu_ts.c
drivers/input/touchscreen/gunze.c
drivers/input/touchscreen/h3600_ts_input.c
drivers/input/touchscreen/hampshire.c
drivers/input/touchscreen/inexio.c
drivers/input/touchscreen/mtouch.c
drivers/input/touchscreen/penmount.c
drivers/input/touchscreen/touchit213.c
drivers/input/touchscreen/touchright.c
drivers/input/touchscreen/touchwin.c
drivers/input/touchscreen/tsc40.c
drivers/input/touchscreen/wacom_w8001.c

index 40e40780747d50d2536824045171370a61f667bb..9fb153eef2fc07b28661a7ec4661a952587319cc 100644 (file)
@@ -222,19 +222,4 @@ static struct serio_driver magellan_drv = {
        .disconnect     = magellan_disconnect,
 };
 
-/*
- * The functions for inserting/removing us as a module.
- */
-
-static int __init magellan_init(void)
-{
-       return serio_register_driver(&magellan_drv);
-}
-
-static void __exit magellan_exit(void)
-{
-       serio_unregister_driver(&magellan_drv);
-}
-
-module_init(magellan_init);
-module_exit(magellan_exit);
+module_serio_driver(magellan_drv);
index 0cd9b29356a8a5f06bb31885ef0581fa5c57f2dc..80a7b27a457a046cb94efd10dbc8ff84bb0eab8b 100644 (file)
@@ -296,19 +296,4 @@ static struct serio_driver spaceball_drv = {
        .disconnect     = spaceball_disconnect,
 };
 
-/*
- * The functions for inserting/removing us as a module.
- */
-
-static int __init spaceball_init(void)
-{
-       return serio_register_driver(&spaceball_drv);
-}
-
-static void __exit spaceball_exit(void)
-{
-       serio_unregister_driver(&spaceball_drv);
-}
-
-module_init(spaceball_init);
-module_exit(spaceball_exit);
+module_serio_driver(spaceball_drv);
index a694bf8e557bbca7ec84e2101a0e895a226f5d34..a41f291652e6ce55b028e21f4049f50ad226e3f9 100644 (file)
@@ -237,19 +237,4 @@ static struct serio_driver spaceorb_drv = {
        .disconnect     = spaceorb_disconnect,
 };
 
-/*
- * The functions for inserting/removing us as a module.
- */
-
-static int __init spaceorb_init(void)
-{
-       return serio_register_driver(&spaceorb_drv);
-}
-
-static void __exit spaceorb_exit(void)
-{
-       serio_unregister_driver(&spaceorb_drv);
-}
-
-module_init(spaceorb_init);
-module_exit(spaceorb_exit);
+module_serio_driver(spaceorb_drv);
index e0db9f5e4b413962baa220b37ee4640927e51882..0f51a60e14a7f9903950c37b55c16d35fb83b98a 100644 (file)
@@ -208,19 +208,4 @@ static struct serio_driver stinger_drv = {
        .disconnect     = stinger_disconnect,
 };
 
-/*
- * The functions for inserting/removing us as a module.
- */
-
-static int __init stinger_init(void)
-{
-       return serio_register_driver(&stinger_drv);
-}
-
-static void __exit stinger_exit(void)
-{
-       serio_unregister_driver(&stinger_drv);
-}
-
-module_init(stinger_init);
-module_exit(stinger_exit);
+module_serio_driver(stinger_drv);
index 3f4ec73c9553a2debeb52f2789b3e016a555b7cb..2556a819357978897db8889dda334180b621c045 100644 (file)
@@ -257,19 +257,4 @@ static struct serio_driver twidjoy_drv = {
        .disconnect     = twidjoy_disconnect,
 };
 
-/*
- * The functions for inserting/removing us as a module.
- */
-
-static int __init twidjoy_init(void)
-{
-       return serio_register_driver(&twidjoy_drv);
-}
-
-static void __exit twidjoy_exit(void)
-{
-       serio_unregister_driver(&twidjoy_drv);
-}
-
-module_init(twidjoy_init);
-module_exit(twidjoy_exit);
+module_serio_driver(twidjoy_drv);
index f72c83e15e6020ddfa288558011ef8918efaa3d3..23b3071abb6e4b92ba8cf01b9e8bb8994c8e485e 100644 (file)
@@ -217,19 +217,4 @@ static struct serio_driver warrior_drv = {
        .disconnect     = warrior_disconnect,
 };
 
-/*
- * The functions for inserting/removing us as a module.
- */
-
-static int __init warrior_init(void)
-{
-       return serio_register_driver(&warrior_drv);
-}
-
-static void __exit warrior_exit(void)
-{
-       serio_unregister_driver(&warrior_drv);
-}
-
-module_init(warrior_init);
-module_exit(warrior_exit);
+module_serio_driver(warrior_drv);
index b5853125c8987b72ecf766e123e1e66db727a6c5..c4de4388fd7f1f1b6efd1dbf3b2013e74b6e8881 100644 (file)
@@ -225,19 +225,4 @@ static struct serio_driver zhenhua_drv = {
        .disconnect     = zhenhua_disconnect,
 };
 
-/*
- * The functions for inserting/removing us as a module.
- */
-
-static int __init zhenhua_init(void)
-{
-       return serio_register_driver(&zhenhua_drv);
-}
-
-static void __exit zhenhua_exit(void)
-{
-       serio_unregister_driver(&zhenhua_drv);
-}
-
-module_init(zhenhua_init);
-module_exit(zhenhua_exit);
+module_serio_driver(zhenhua_drv);
index fed31e0947a170f7a39468f97ec4ab10a3ab3181..589e3c258f3f1ecd48c0df846987e796b02ebdbc 100644 (file)
@@ -583,15 +583,4 @@ static struct serio_driver hil_serio_drv = {
        .interrupt      = hil_dev_interrupt
 };
 
-static int __init hil_dev_init(void)
-{
-       return serio_register_driver(&hil_serio_drv);
-}
-
-static void __exit hil_dev_exit(void)
-{
-       serio_unregister_driver(&hil_serio_drv);
-}
-
-module_init(hil_dev_init);
-module_exit(hil_dev_exit);
+module_serio_driver(hil_serio_drv);
index fa9bb6d235e20b88695f95e85c3164fae911d334..fc0a63c2f2785a8b529ad3e0afc43debc284d6c7 100644 (file)
@@ -731,19 +731,4 @@ static struct serio_driver lkkbd_drv = {
        .interrupt      = lkkbd_interrupt,
 };
 
-/*
- * The functions for insering/removing us as a module.
- */
-static int __init lkkbd_init(void)
-{
-       return serio_register_driver(&lkkbd_drv);
-}
-
-static void __exit lkkbd_exit(void)
-{
-       serio_unregister_driver(&lkkbd_drv);
-}
-
-module_init(lkkbd_init);
-module_exit(lkkbd_exit);
-
+module_serio_driver(lkkbd_drv);
index 48d1cab0aa1c7284dcc795391d1759303f39db7c..f971898ad59183f07aafd0811cd725f3aea903e2 100644 (file)
@@ -166,15 +166,4 @@ static struct serio_driver nkbd_drv = {
        .disconnect     = nkbd_disconnect,
 };
 
-static int __init nkbd_init(void)
-{
-       return serio_register_driver(&nkbd_drv);
-}
-
-static void __exit nkbd_exit(void)
-{
-       serio_unregister_driver(&nkbd_drv);
-}
-
-module_init(nkbd_init);
-module_exit(nkbd_exit);
+module_serio_driver(nkbd_drv);
index 7437219370b1a22e0695003d7318f596e60350d1..cc612c5d542782fdf898757bdfdd1434b7d19d86 100644 (file)
@@ -170,15 +170,4 @@ static struct serio_driver skbd_drv = {
        .disconnect     = skbd_disconnect,
 };
 
-static int __init skbd_init(void)
-{
-       return serio_register_driver(&skbd_drv);
-}
-
-static void __exit skbd_exit(void)
-{
-       serio_unregister_driver(&skbd_drv);
-}
-
-module_init(skbd_init);
-module_exit(skbd_exit);
+module_serio_driver(skbd_drv);
index a99a04b03ee49f3161d3f97ff6cecc8141b50ec9..5f836b1638c159fa4f2386e09c516092abe8dbd8 100644 (file)
@@ -369,19 +369,4 @@ static struct serio_driver sunkbd_drv = {
        .disconnect     = sunkbd_disconnect,
 };
 
-/*
- * The functions for insering/removing us as a module.
- */
-
-static int __init sunkbd_init(void)
-{
-       return serio_register_driver(&sunkbd_drv);
-}
-
-static void __exit sunkbd_exit(void)
-{
-       serio_unregister_driver(&sunkbd_drv);
-}
-
-module_init(sunkbd_init);
-module_exit(sunkbd_exit);
+module_serio_driver(sunkbd_drv);
index 37b01d777a4abc2ccf8652d91a15839bee41d334..d050d9d0011bfe42313e0617ea8674591c57f466 100644 (file)
@@ -169,15 +169,4 @@ static struct serio_driver xtkbd_drv = {
        .disconnect     = xtkbd_disconnect,
 };
 
-static int __init xtkbd_init(void)
-{
-       return serio_register_driver(&xtkbd_drv);
-}
-
-static void __exit xtkbd_exit(void)
-{
-       serio_unregister_driver(&xtkbd_drv);
-}
-
-module_init(xtkbd_init);
-module_exit(xtkbd_exit);
+module_serio_driver(xtkbd_drv);
index 17ff137b9bd5ee2b3fedd916f752270c415f0299..d5928fd0c914e8f28e30eee232ea990cfb47f484 100644 (file)
@@ -355,15 +355,4 @@ static struct serio_driver sermouse_drv = {
        .disconnect     = sermouse_disconnect,
 };
 
-static int __init sermouse_init(void)
-{
-       return serio_register_driver(&sermouse_drv);
-}
-
-static void __exit sermouse_exit(void)
-{
-       serio_unregister_driver(&sermouse_drv);
-}
-
-module_init(sermouse_init);
-module_exit(sermouse_exit);
+module_serio_driver(sermouse_drv);
index eb9a3cfbeefaacba0f646cd7bd225a535303a816..e900d465aaf624f73762f0a5fe9a3461d76da5b0 100644 (file)
@@ -548,16 +548,4 @@ static struct serio_driver vsxxxaa_drv = {
        .disconnect     = vsxxxaa_disconnect,
 };
 
-static int __init vsxxxaa_init(void)
-{
-       return serio_register_driver(&vsxxxaa_drv);
-}
-
-static void __exit vsxxxaa_exit(void)
-{
-       serio_unregister_driver(&vsxxxaa_drv);
-}
-
-module_init(vsxxxaa_init);
-module_exit(vsxxxaa_exit);
-
+module_serio_driver(vsxxxaa_drv);
index 15aa81c9f1fb0215d1552bd36d22c5adf10d62c4..a76fb64f03db8fe910b4cd67688e848453489c70 100644 (file)
@@ -304,15 +304,4 @@ static struct serio_driver ps2mult_drv = {
        .reconnect      = ps2mult_reconnect,
 };
 
-static int __init ps2mult_init(void)
-{
-       return serio_register_driver(&ps2mult_drv);
-}
-
-static void __exit ps2mult_exit(void)
-{
-       serio_unregister_driver(&ps2mult_drv);
-}
-
-module_init(ps2mult_init);
-module_exit(ps2mult_exit);
+module_serio_driver(ps2mult_drv);
index 4494233d331ac4689eef8ca58366c7138904627d..948fd5a045f75266ebdbc06648a3dd93d8a6b2ec 100644 (file)
@@ -432,15 +432,4 @@ static struct serio_driver serio_raw_drv = {
        .manual_bind    = true,
 };
 
-static int __init serio_raw_init(void)
-{
-       return serio_register_driver(&serio_raw_drv);
-}
-
-static void __exit serio_raw_exit(void)
-{
-       serio_unregister_driver(&serio_raw_drv);
-}
-
-module_init(serio_raw_init);
-module_exit(serio_raw_exit);
+module_serio_driver(serio_raw_drv);
index 455353908bdfefeca9620377fc1072d1eba5c91d..1809677a6513fd0a9221010d8ce0e2c3f6475060 100644 (file)
@@ -188,19 +188,4 @@ static struct serio_driver dynapro_drv = {
        .disconnect     = dynapro_disconnect,
 };
 
-/*
- * The functions for inserting/removing us as a module.
- */
-
-static int __init dynapro_init(void)
-{
-       return serio_register_driver(&dynapro_drv);
-}
-
-static void __exit dynapro_exit(void)
-{
-       serio_unregister_driver(&dynapro_drv);
-}
-
-module_init(dynapro_init);
-module_exit(dynapro_exit);
+module_serio_driver(dynapro_drv);
index 486d31ba9c0952b28f95e73baa75a78b53316255..957423d1471db4d873c3312c1df1e427b643514f 100644 (file)
@@ -405,19 +405,4 @@ static struct serio_driver elo_drv = {
        .disconnect     = elo_disconnect,
 };
 
-/*
- * The functions for inserting/removing us as a module.
- */
-
-static int __init elo_init(void)
-{
-       return serio_register_driver(&elo_drv);
-}
-
-static void __exit elo_exit(void)
-{
-       serio_unregister_driver(&elo_drv);
-}
-
-module_init(elo_init);
-module_exit(elo_exit);
+module_serio_driver(elo_drv);
index 80b21800355f10d255a8e8f06fdad8a3b37270fa..10794ddbdf588503495badb9b26937a913ab4db3 100644 (file)
@@ -175,15 +175,4 @@ static struct serio_driver fujitsu_drv = {
        .disconnect     = fujitsu_disconnect,
 };
 
-static int __init fujitsu_init(void)
-{
-       return serio_register_driver(&fujitsu_drv);
-}
-
-static void __exit fujitsu_exit(void)
-{
-       serio_unregister_driver(&fujitsu_drv);
-}
-
-module_init(fujitsu_init);
-module_exit(fujitsu_exit);
+module_serio_driver(fujitsu_drv);
index a54f90e02ab60b5f8ac2ab914872fcb270a9c914..41c71766bf18d85285c18004fbf494b8cac86112 100644 (file)
@@ -186,19 +186,4 @@ static struct serio_driver gunze_drv = {
        .disconnect     = gunze_disconnect,
 };
 
-/*
- * The functions for inserting/removing us as a module.
- */
-
-static int __init gunze_init(void)
-{
-       return serio_register_driver(&gunze_drv);
-}
-
-static void __exit gunze_exit(void)
-{
-       serio_unregister_driver(&gunze_drv);
-}
-
-module_init(gunze_init);
-module_exit(gunze_exit);
+module_serio_driver(gunze_drv);
index 6107e563e68141545f356bbdd724ebbd70ebcd7e..b9e8686a6f1c036b7bd6a61f89d352e02122f014 100644 (file)
@@ -476,19 +476,4 @@ static struct serio_driver h3600ts_drv = {
        .disconnect     = h3600ts_disconnect,
 };
 
-/*
- * The functions for inserting/removing us as a module.
- */
-
-static int __init h3600ts_init(void)
-{
-       return serio_register_driver(&h3600ts_drv);
-}
-
-static void __exit h3600ts_exit(void)
-{
-       serio_unregister_driver(&h3600ts_drv);
-}
-
-module_init(h3600ts_init);
-module_exit(h3600ts_exit);
+module_serio_driver(h3600ts_drv);
index 2da6cc31bb2187f0b62770bd09aa6c0923c36687..0cc47ea98acff584cf04bcf93d8305b638fe1714 100644 (file)
@@ -187,19 +187,4 @@ static struct serio_driver hampshire_drv = {
        .disconnect     = hampshire_disconnect,
 };
 
-/*
- * The functions for inserting/removing us as a module.
- */
-
-static int __init hampshire_init(void)
-{
-       return serio_register_driver(&hampshire_drv);
-}
-
-static void __exit hampshire_exit(void)
-{
-       serio_unregister_driver(&hampshire_drv);
-}
-
-module_init(hampshire_init);
-module_exit(hampshire_exit);
+module_serio_driver(hampshire_drv);
index 192ade0a0fb9cf7424a79069a3def4f103b31e08..a29c99c32245eda591bdcf457d853c78566af3ca 100644 (file)
@@ -189,19 +189,4 @@ static struct serio_driver inexio_drv = {
        .disconnect     = inexio_disconnect,
 };
 
-/*
- * The functions for inserting/removing us as a module.
- */
-
-static int __init inexio_init(void)
-{
-       return serio_register_driver(&inexio_drv);
-}
-
-static void __exit inexio_exit(void)
-{
-       serio_unregister_driver(&inexio_drv);
-}
-
-module_init(inexio_init);
-module_exit(inexio_exit);
+module_serio_driver(inexio_drv);
index 9077228418b7028242caa03cc99292ee8f2c62cd..eb66b7c37c2f9408e3a29b7fd7b5254bf7dcfb08 100644 (file)
@@ -202,19 +202,4 @@ static struct serio_driver mtouch_drv = {
        .disconnect     = mtouch_disconnect,
 };
 
-/*
- * The functions for inserting/removing us as a module.
- */
-
-static int __init mtouch_init(void)
-{
-       return serio_register_driver(&mtouch_drv);
-}
-
-static void __exit mtouch_exit(void)
-{
-       serio_unregister_driver(&mtouch_drv);
-}
-
-module_init(mtouch_init);
-module_exit(mtouch_exit);
+module_serio_driver(mtouch_drv);
index 4c012fb2b01eb091f764abea0ef992e8052a53d3..4ccde45b9da2bfac620f81c62aa9c6b95d5f873c 100644 (file)
@@ -317,19 +317,4 @@ static struct serio_driver pm_drv = {
        .disconnect     = pm_disconnect,
 };
 
-/*
- * The functions for inserting/removing us as a module.
- */
-
-static int __init pm_init(void)
-{
-       return serio_register_driver(&pm_drv);
-}
-
-static void __exit pm_exit(void)
-{
-       serio_unregister_driver(&pm_drv);
-}
-
-module_init(pm_init);
-module_exit(pm_exit);
+module_serio_driver(pm_drv);
index d1297ba19daf622e8fa791962d49088653ac0910..5f29e5b8e1c1995bbede2bb5df00f7cc609a59d1 100644 (file)
@@ -216,19 +216,4 @@ static struct serio_driver touchit213_drv = {
        .disconnect     = touchit213_disconnect,
 };
 
-/*
- * The functions for inserting/removing us as a module.
- */
-
-static int __init touchit213_init(void)
-{
-       return serio_register_driver(&touchit213_drv);
-}
-
-static void __exit touchit213_exit(void)
-{
-       serio_unregister_driver(&touchit213_drv);
-}
-
-module_init(touchit213_init);
-module_exit(touchit213_exit);
+module_serio_driver(touchit213_drv);
index 3a5c142c2a78a6fd6b0e55cbf79c5c57bf236999..8a2887daf194ed26c204ff5cf216f4261ec05520 100644 (file)
@@ -176,19 +176,4 @@ static struct serio_driver tr_drv = {
        .disconnect     = tr_disconnect,
 };
 
-/*
- * The functions for inserting/removing us as a module.
- */
-
-static int __init tr_init(void)
-{
-       return serio_register_driver(&tr_drv);
-}
-
-static void __exit tr_exit(void)
-{
-       serio_unregister_driver(&tr_drv);
-}
-
-module_init(tr_init);
-module_exit(tr_exit);
+module_serio_driver(tr_drv);
index 763a656a59f8270929f2366f710147ef2339e43e..588cdcb839ddef36541f5f685972a919417628c1 100644 (file)
@@ -183,19 +183,4 @@ static struct serio_driver tw_drv = {
        .disconnect     = tw_disconnect,
 };
 
-/*
- * The functions for inserting/removing us as a module.
- */
-
-static int __init tw_init(void)
-{
-       return serio_register_driver(&tw_drv);
-}
-
-static void __exit tw_exit(void)
-{
-       serio_unregister_driver(&tw_drv);
-}
-
-module_init(tw_init);
-module_exit(tw_exit);
+module_serio_driver(tw_drv);
index 29d5ed4dd31c8b3b975654cc4c39d97f2308a688..63209aaa55f01f1baf65a8a1632c8c2ce4056870 100644 (file)
@@ -167,17 +167,7 @@ static struct serio_driver tsc_drv = {
        .disconnect     = tsc_disconnect,
 };
 
-static int __init tsc_ser_init(void)
-{
-       return serio_register_driver(&tsc_drv);
-}
-module_init(tsc_ser_init);
-
-static void __exit tsc_exit(void)
-{
-       serio_unregister_driver(&tsc_drv);
-}
-module_exit(tsc_exit);
+module_serio_driver(tsc_drv);
 
 MODULE_AUTHOR("Sebastian Andrzej Siewior <bigeasy@linutronix.de>");
 MODULE_DESCRIPTION(DRIVER_DESC);
index 1569a3934ab26dc56d2afc9ffad5d59fb1c7e28a..8f9ad2f893b825a0c2d3afc5a9777ec098003308 100644 (file)
@@ -594,15 +594,4 @@ static struct serio_driver w8001_drv = {
        .disconnect     = w8001_disconnect,
 };
 
-static int __init w8001_init(void)
-{
-       return serio_register_driver(&w8001_drv);
-}
-
-static void __exit w8001_exit(void)
-{
-       serio_unregister_driver(&w8001_drv);
-}
-
-module_init(w8001_init);
-module_exit(w8001_exit);
+module_serio_driver(w8001_drv);