diff options
author | Axel Lin <axel.lin@gmail.com> | 2012-04-04 10:52:27 +0400 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2012-04-04 20:25:44 +0400 |
commit | 98a84131926ebafe868c65631b69d4912922211e (patch) | |
tree | 1f14309be518ea679b8c963e689718b21355e466 /drivers/input | |
parent | 45b2604eaaa105223ce60117b0482ca8a488f9c4 (diff) | |
download | linux-98a84131926ebafe868c65631b69d4912922211e.tar.xz |
Input: gameport - use module_gameport_driver
This patch converts the drivers in drivers/input/* to use
module_gameport_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')
-rw-r--r-- | drivers/input/joystick/a3d.c | 13 | ||||
-rw-r--r-- | drivers/input/joystick/adi.c | 17 | ||||
-rw-r--r-- | drivers/input/joystick/cobra.c | 13 | ||||
-rw-r--r-- | drivers/input/joystick/gf2k.c | 13 | ||||
-rw-r--r-- | drivers/input/joystick/grip.c | 13 | ||||
-rw-r--r-- | drivers/input/joystick/grip_mp.c | 13 | ||||
-rw-r--r-- | drivers/input/joystick/guillemot.c | 13 | ||||
-rw-r--r-- | drivers/input/joystick/interact.c | 13 | ||||
-rw-r--r-- | drivers/input/joystick/joydump.c | 13 | ||||
-rw-r--r-- | drivers/input/joystick/sidewinder.c | 13 | ||||
-rw-r--r-- | drivers/input/joystick/tmdc.c | 13 |
11 files changed, 11 insertions, 136 deletions
diff --git a/drivers/input/joystick/a3d.c b/drivers/input/joystick/a3d.c index 1639ab2b94b7..85bc8dc07cfc 100644 --- a/drivers/input/joystick/a3d.c +++ b/drivers/input/joystick/a3d.c @@ -413,15 +413,4 @@ static struct gameport_driver a3d_drv = { .disconnect = a3d_disconnect, }; -static int __init a3d_init(void) -{ - return gameport_register_driver(&a3d_drv); -} - -static void __exit a3d_exit(void) -{ - gameport_unregister_driver(&a3d_drv); -} - -module_init(a3d_init); -module_exit(a3d_exit); +module_gameport_driver(a3d_drv); diff --git a/drivers/input/joystick/adi.c b/drivers/input/joystick/adi.c index b992fbf91f2f..0cbfd2dfabf4 100644 --- a/drivers/input/joystick/adi.c +++ b/drivers/input/joystick/adi.c @@ -557,10 +557,6 @@ static void adi_disconnect(struct gameport *gameport) kfree(port); } -/* - * The gameport device structure. - */ - static struct gameport_driver adi_drv = { .driver = { .name = "adi", @@ -570,15 +566,4 @@ static struct gameport_driver adi_drv = { .disconnect = adi_disconnect, }; -static int __init adi_init(void) -{ - return gameport_register_driver(&adi_drv); -} - -static void __exit adi_exit(void) -{ - gameport_unregister_driver(&adi_drv); -} - -module_init(adi_init); -module_exit(adi_exit); +module_gameport_driver(adi_drv); diff --git a/drivers/input/joystick/cobra.c b/drivers/input/joystick/cobra.c index 3497b87c3d05..65367e44d715 100644 --- a/drivers/input/joystick/cobra.c +++ b/drivers/input/joystick/cobra.c @@ -261,15 +261,4 @@ static struct gameport_driver cobra_drv = { .disconnect = cobra_disconnect, }; -static int __init cobra_init(void) -{ - return gameport_register_driver(&cobra_drv); -} - -static void __exit cobra_exit(void) -{ - gameport_unregister_driver(&cobra_drv); -} - -module_init(cobra_init); -module_exit(cobra_exit); +module_gameport_driver(cobra_drv); diff --git a/drivers/input/joystick/gf2k.c b/drivers/input/joystick/gf2k.c index 0536b1b2f018..ab1cf2882004 100644 --- a/drivers/input/joystick/gf2k.c +++ b/drivers/input/joystick/gf2k.c @@ -373,15 +373,4 @@ static struct gameport_driver gf2k_drv = { .disconnect = gf2k_disconnect, }; -static int __init gf2k_init(void) -{ - return gameport_register_driver(&gf2k_drv); -} - -static void __exit gf2k_exit(void) -{ - gameport_unregister_driver(&gf2k_drv); -} - -module_init(gf2k_init); -module_exit(gf2k_exit); +module_gameport_driver(gf2k_drv); diff --git a/drivers/input/joystick/grip.c b/drivers/input/joystick/grip.c index fc55899ba6c5..9e1beff57c33 100644 --- a/drivers/input/joystick/grip.c +++ b/drivers/input/joystick/grip.c @@ -424,15 +424,4 @@ static struct gameport_driver grip_drv = { .disconnect = grip_disconnect, }; -static int __init grip_init(void) -{ - return gameport_register_driver(&grip_drv); -} - -static void __exit grip_exit(void) -{ - gameport_unregister_driver(&grip_drv); -} - -module_init(grip_init); -module_exit(grip_exit); +module_gameport_driver(grip_drv); diff --git a/drivers/input/joystick/grip_mp.c b/drivers/input/joystick/grip_mp.c index 2d47baf47769..c0f9c7b7eb4e 100644 --- a/drivers/input/joystick/grip_mp.c +++ b/drivers/input/joystick/grip_mp.c @@ -687,15 +687,4 @@ static struct gameport_driver grip_drv = { .disconnect = grip_disconnect, }; -static int __init grip_init(void) -{ - return gameport_register_driver(&grip_drv); -} - -static void __exit grip_exit(void) -{ - gameport_unregister_driver(&grip_drv); -} - -module_init(grip_init); -module_exit(grip_exit); +module_gameport_driver(grip_drv); diff --git a/drivers/input/joystick/guillemot.c b/drivers/input/joystick/guillemot.c index 4058d4b272fe..55196f730af6 100644 --- a/drivers/input/joystick/guillemot.c +++ b/drivers/input/joystick/guillemot.c @@ -281,15 +281,4 @@ static struct gameport_driver guillemot_drv = { .disconnect = guillemot_disconnect, }; -static int __init guillemot_init(void) -{ - return gameport_register_driver(&guillemot_drv); -} - -static void __exit guillemot_exit(void) -{ - gameport_unregister_driver(&guillemot_drv); -} - -module_init(guillemot_init); -module_exit(guillemot_exit); +module_gameport_driver(guillemot_drv); diff --git a/drivers/input/joystick/interact.c b/drivers/input/joystick/interact.c index 16fb19d1ca25..88c22623a2e8 100644 --- a/drivers/input/joystick/interact.c +++ b/drivers/input/joystick/interact.c @@ -311,15 +311,4 @@ static struct gameport_driver interact_drv = { .disconnect = interact_disconnect, }; -static int __init interact_init(void) -{ - return gameport_register_driver(&interact_drv); -} - -static void __exit interact_exit(void) -{ - gameport_unregister_driver(&interact_drv); -} - -module_init(interact_init); -module_exit(interact_exit); +module_gameport_driver(interact_drv); diff --git a/drivers/input/joystick/joydump.c b/drivers/input/joystick/joydump.c index cd894a0564a2..7eb878bab968 100644 --- a/drivers/input/joystick/joydump.c +++ b/drivers/input/joystick/joydump.c @@ -159,15 +159,4 @@ static struct gameport_driver joydump_drv = { .disconnect = joydump_disconnect, }; -static int __init joydump_init(void) -{ - return gameport_register_driver(&joydump_drv); -} - -static void __exit joydump_exit(void) -{ - gameport_unregister_driver(&joydump_drv); -} - -module_init(joydump_init); -module_exit(joydump_exit); +module_gameport_driver(joydump_drv); diff --git a/drivers/input/joystick/sidewinder.c b/drivers/input/joystick/sidewinder.c index b8d86115644b..04c69af37148 100644 --- a/drivers/input/joystick/sidewinder.c +++ b/drivers/input/joystick/sidewinder.c @@ -820,15 +820,4 @@ static struct gameport_driver sw_drv = { .disconnect = sw_disconnect, }; -static int __init sw_init(void) -{ - return gameport_register_driver(&sw_drv); -} - -static void __exit sw_exit(void) -{ - gameport_unregister_driver(&sw_drv); -} - -module_init(sw_init); -module_exit(sw_exit); +module_gameport_driver(sw_drv); diff --git a/drivers/input/joystick/tmdc.c b/drivers/input/joystick/tmdc.c index d6c609807115..5ef9bcdb0345 100644 --- a/drivers/input/joystick/tmdc.c +++ b/drivers/input/joystick/tmdc.c @@ -436,15 +436,4 @@ static struct gameport_driver tmdc_drv = { .disconnect = tmdc_disconnect, }; -static int __init tmdc_init(void) -{ - return gameport_register_driver(&tmdc_drv); -} - -static void __exit tmdc_exit(void) -{ - gameport_unregister_driver(&tmdc_drv); -} - -module_init(tmdc_init); -module_exit(tmdc_exit); +module_gameport_driver(tmdc_drv); |