aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@gmail.com>2012-04-04 02:52:27 -0400
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2012-04-04 12:25:44 -0400
commit98a84131926ebafe868c65631b69d4912922211e (patch)
tree1f14309be518ea679b8c963e689718b21355e466 /drivers
parent45b2604eaaa105223ce60117b0482ca8a488f9c4 (diff)
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')
-rw-r--r--drivers/input/joystick/a3d.c13
-rw-r--r--drivers/input/joystick/adi.c17
-rw-r--r--drivers/input/joystick/cobra.c13
-rw-r--r--drivers/input/joystick/gf2k.c13
-rw-r--r--drivers/input/joystick/grip.c13
-rw-r--r--drivers/input/joystick/grip_mp.c13
-rw-r--r--drivers/input/joystick/guillemot.c13
-rw-r--r--drivers/input/joystick/interact.c13
-rw-r--r--drivers/input/joystick/joydump.c13
-rw-r--r--drivers/input/joystick/sidewinder.c13
-rw-r--r--drivers/input/joystick/tmdc.c13
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 = {
413 .disconnect = a3d_disconnect, 413 .disconnect = a3d_disconnect,
414}; 414};
415 415
416static int __init a3d_init(void) 416module_gameport_driver(a3d_drv);
417{
418 return gameport_register_driver(&a3d_drv);
419}
420
421static void __exit a3d_exit(void)
422{
423 gameport_unregister_driver(&a3d_drv);
424}
425
426module_init(a3d_init);
427module_exit(a3d_exit);
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)
557 kfree(port); 557 kfree(port);
558} 558}
559 559
560/*
561 * The gameport device structure.
562 */
563
564static struct gameport_driver adi_drv = { 560static struct gameport_driver adi_drv = {
565 .driver = { 561 .driver = {
566 .name = "adi", 562 .name = "adi",
@@ -570,15 +566,4 @@ static struct gameport_driver adi_drv = {
570 .disconnect = adi_disconnect, 566 .disconnect = adi_disconnect,
571}; 567};
572 568
573static int __init adi_init(void) 569module_gameport_driver(adi_drv);
574{
575 return gameport_register_driver(&adi_drv);
576}
577
578static void __exit adi_exit(void)
579{
580 gameport_unregister_driver(&adi_drv);
581}
582
583module_init(adi_init);
584module_exit(adi_exit);
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 = {
261 .disconnect = cobra_disconnect, 261 .disconnect = cobra_disconnect,
262}; 262};
263 263
264static int __init cobra_init(void) 264module_gameport_driver(cobra_drv);
265{
266 return gameport_register_driver(&cobra_drv);
267}
268
269static void __exit cobra_exit(void)
270{
271 gameport_unregister_driver(&cobra_drv);
272}
273
274module_init(cobra_init);
275module_exit(cobra_exit);
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 = {
373 .disconnect = gf2k_disconnect, 373 .disconnect = gf2k_disconnect,
374}; 374};
375 375
376static int __init gf2k_init(void) 376module_gameport_driver(gf2k_drv);
377{
378 return gameport_register_driver(&gf2k_drv);
379}
380
381static void __exit gf2k_exit(void)
382{
383 gameport_unregister_driver(&gf2k_drv);
384}
385
386module_init(gf2k_init);
387module_exit(gf2k_exit);
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 = {
424 .disconnect = grip_disconnect, 424 .disconnect = grip_disconnect,
425}; 425};
426 426
427static int __init grip_init(void) 427module_gameport_driver(grip_drv);
428{
429 return gameport_register_driver(&grip_drv);
430}
431
432static void __exit grip_exit(void)
433{
434 gameport_unregister_driver(&grip_drv);
435}
436
437module_init(grip_init);
438module_exit(grip_exit);
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 = {
687 .disconnect = grip_disconnect, 687 .disconnect = grip_disconnect,
688}; 688};
689 689
690static int __init grip_init(void) 690module_gameport_driver(grip_drv);
691{
692 return gameport_register_driver(&grip_drv);
693}
694
695static void __exit grip_exit(void)
696{
697 gameport_unregister_driver(&grip_drv);
698}
699
700module_init(grip_init);
701module_exit(grip_exit);
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 = {
281 .disconnect = guillemot_disconnect, 281 .disconnect = guillemot_disconnect,
282}; 282};
283 283
284static int __init guillemot_init(void) 284module_gameport_driver(guillemot_drv);
285{
286 return gameport_register_driver(&guillemot_drv);
287}
288
289static void __exit guillemot_exit(void)
290{
291 gameport_unregister_driver(&guillemot_drv);
292}
293
294module_init(guillemot_init);
295module_exit(guillemot_exit);
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 = {
311 .disconnect = interact_disconnect, 311 .disconnect = interact_disconnect,
312}; 312};
313 313
314static int __init interact_init(void) 314module_gameport_driver(interact_drv);
315{
316 return gameport_register_driver(&interact_drv);
317}
318
319static void __exit interact_exit(void)
320{
321 gameport_unregister_driver(&interact_drv);
322}
323
324module_init(interact_init);
325module_exit(interact_exit);
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 = {
159 .disconnect = joydump_disconnect, 159 .disconnect = joydump_disconnect,
160}; 160};
161 161
162static int __init joydump_init(void) 162module_gameport_driver(joydump_drv);
163{
164 return gameport_register_driver(&joydump_drv);
165}
166
167static void __exit joydump_exit(void)
168{
169 gameport_unregister_driver(&joydump_drv);
170}
171
172module_init(joydump_init);
173module_exit(joydump_exit);
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 = {
820 .disconnect = sw_disconnect, 820 .disconnect = sw_disconnect,
821}; 821};
822 822
823static int __init sw_init(void) 823module_gameport_driver(sw_drv);
824{
825 return gameport_register_driver(&sw_drv);
826}
827
828static void __exit sw_exit(void)
829{
830 gameport_unregister_driver(&sw_drv);
831}
832
833module_init(sw_init);
834module_exit(sw_exit);
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 = {
436 .disconnect = tmdc_disconnect, 436 .disconnect = tmdc_disconnect,
437}; 437};
438 438
439static int __init tmdc_init(void) 439module_gameport_driver(tmdc_drv);
440{
441 return gameport_register_driver(&tmdc_drv);
442}
443
444static void __exit tmdc_exit(void)
445{
446 gameport_unregister_driver(&tmdc_drv);
447}
448
449module_init(tmdc_init);
450module_exit(tmdc_exit);