diff options
author | Axel Lin <axel.lin@gmail.com> | 2012-04-04 08:50:17 +0200 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2012-04-04 18:25:43 +0200 |
commit | 65ac9f7a23c934ee8c40dc20955e75db4924bfea (patch) | |
tree | 7baa3439e9b0a774073473cccef6960e7f77bc6e /drivers/input/joystick | |
parent | Input: serio - add helper macro for serio_driver boilerplate (diff) | |
download | linux-65ac9f7a23c934ee8c40dc20955e75db4924bfea.tar.xz linux-65ac9f7a23c934ee8c40dc20955e75db4924bfea.zip |
Input: serio - use module_serio_driver
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>
Diffstat (limited to 'drivers/input/joystick')
-rw-r--r-- | drivers/input/joystick/magellan.c | 17 | ||||
-rw-r--r-- | drivers/input/joystick/spaceball.c | 17 | ||||
-rw-r--r-- | drivers/input/joystick/spaceorb.c | 17 | ||||
-rw-r--r-- | drivers/input/joystick/stinger.c | 17 | ||||
-rw-r--r-- | drivers/input/joystick/twidjoy.c | 17 | ||||
-rw-r--r-- | drivers/input/joystick/warrior.c | 17 | ||||
-rw-r--r-- | drivers/input/joystick/zhenhua.c | 17 |
7 files changed, 7 insertions, 112 deletions
diff --git a/drivers/input/joystick/magellan.c b/drivers/input/joystick/magellan.c index 40e40780747d..9fb153eef2fc 100644 --- a/drivers/input/joystick/magellan.c +++ b/drivers/input/joystick/magellan.c @@ -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); diff --git a/drivers/input/joystick/spaceball.c b/drivers/input/joystick/spaceball.c index 0cd9b29356a8..80a7b27a457a 100644 --- a/drivers/input/joystick/spaceball.c +++ b/drivers/input/joystick/spaceball.c @@ -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); diff --git a/drivers/input/joystick/spaceorb.c b/drivers/input/joystick/spaceorb.c index a694bf8e557b..a41f291652e6 100644 --- a/drivers/input/joystick/spaceorb.c +++ b/drivers/input/joystick/spaceorb.c @@ -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); diff --git a/drivers/input/joystick/stinger.c b/drivers/input/joystick/stinger.c index e0db9f5e4b41..0f51a60e14a7 100644 --- a/drivers/input/joystick/stinger.c +++ b/drivers/input/joystick/stinger.c @@ -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); diff --git a/drivers/input/joystick/twidjoy.c b/drivers/input/joystick/twidjoy.c index 3f4ec73c9553..2556a8193579 100644 --- a/drivers/input/joystick/twidjoy.c +++ b/drivers/input/joystick/twidjoy.c @@ -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); diff --git a/drivers/input/joystick/warrior.c b/drivers/input/joystick/warrior.c index f72c83e15e60..23b3071abb6e 100644 --- a/drivers/input/joystick/warrior.c +++ b/drivers/input/joystick/warrior.c @@ -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); diff --git a/drivers/input/joystick/zhenhua.c b/drivers/input/joystick/zhenhua.c index b5853125c898..c4de4388fd7f 100644 --- a/drivers/input/joystick/zhenhua.c +++ b/drivers/input/joystick/zhenhua.c @@ -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); |