]> git.karo-electronics.de Git - linux-beck.git/commitdiff
Input: gameport - use module_gameport_driver
authorAxel Lin <axel.lin@gmail.com>
Wed, 4 Apr 2012 06:52:27 +0000 (23:52 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Wed, 4 Apr 2012 16:25:44 +0000 (09:25 -0700)
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>
drivers/input/joystick/a3d.c
drivers/input/joystick/adi.c
drivers/input/joystick/cobra.c
drivers/input/joystick/gf2k.c
drivers/input/joystick/grip.c
drivers/input/joystick/grip_mp.c
drivers/input/joystick/guillemot.c
drivers/input/joystick/interact.c
drivers/input/joystick/joydump.c
drivers/input/joystick/sidewinder.c
drivers/input/joystick/tmdc.c

index 1639ab2b94b7326e46a87503d98bcd2e6f3a71cb..85bc8dc07cfc084a32a10397412b649f5c7abbac 100644 (file)
@@ -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);
index b992fbf91f2fd6958405a5bb59735c914945e101..0cbfd2dfabf4502173b165ec66e0c6aaafdbf989 100644 (file)
@@ -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);
index 3497b87c3d0591c12446f16bc232337c3f367981..65367e44d715391b251f0123309345784278173c 100644 (file)
@@ -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);
index 0536b1b2f018e5d6838579e0dfb97f5d4e219880..ab1cf288200403a744fcefbdbfcd9b684196fa4c 100644 (file)
@@ -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);
index fc55899ba6c50a8d5d4c8336d100ca51677d440f..9e1beff57c33a5094f796fa62a13e6f93cb40701 100644 (file)
@@ -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);
index 2d47baf47769843a98e23d9b47665560ef885e7f..c0f9c7b7eb4eb4a4d1c738f7fc4d81f295e81ed1 100644 (file)
@@ -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);
index 4058d4b272fe88fed73a2a3f0183b1d2cbeabd9b..55196f730af6b80dd01284be87df1761b9899370 100644 (file)
@@ -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);
index 16fb19d1ca25f95542e04f8796f97949d1781003..88c22623a2e8cc01ec461d70f216f09486a25904 100644 (file)
@@ -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);
index cd894a0564a2f06932954d7dcec2ff6c179a9d92..7eb878bab9683505b42d40c0c4b79c6c20e93bdf 100644 (file)
@@ -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);
index b8d86115644bbb9e6b9a1c4585ad4fc2bcca7483..04c69af371482e6927fc0416174265c95928d02c 100644 (file)
@@ -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);
index d6c6098071150e02a456d1688c71fbf44a78cd91..5ef9bcdb0345bff2ebacac80ea73ea318403dd03 100644 (file)
@@ -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);