diff options
author | Axel Lin <axel.lin@gmail.com> | 2012-04-04 02:52:27 -0400 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2012-04-04 12:25:44 -0400 |
commit | 98a84131926ebafe868c65631b69d4912922211e (patch) | |
tree | 1f14309be518ea679b8c963e689718b21355e466 /drivers | |
parent | 45b2604eaaa105223ce60117b0482ca8a488f9c4 (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.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 = { | |||
413 | .disconnect = a3d_disconnect, | 413 | .disconnect = a3d_disconnect, |
414 | }; | 414 | }; |
415 | 415 | ||
416 | static int __init a3d_init(void) | 416 | module_gameport_driver(a3d_drv); |
417 | { | ||
418 | return gameport_register_driver(&a3d_drv); | ||
419 | } | ||
420 | |||
421 | static void __exit a3d_exit(void) | ||
422 | { | ||
423 | gameport_unregister_driver(&a3d_drv); | ||
424 | } | ||
425 | |||
426 | module_init(a3d_init); | ||
427 | module_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 | |||
564 | static struct gameport_driver adi_drv = { | 560 | static 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 | ||
573 | static int __init adi_init(void) | 569 | module_gameport_driver(adi_drv); |
574 | { | ||
575 | return gameport_register_driver(&adi_drv); | ||
576 | } | ||
577 | |||
578 | static void __exit adi_exit(void) | ||
579 | { | ||
580 | gameport_unregister_driver(&adi_drv); | ||
581 | } | ||
582 | |||
583 | module_init(adi_init); | ||
584 | module_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 | ||
264 | static int __init cobra_init(void) | 264 | module_gameport_driver(cobra_drv); |
265 | { | ||
266 | return gameport_register_driver(&cobra_drv); | ||
267 | } | ||
268 | |||
269 | static void __exit cobra_exit(void) | ||
270 | { | ||
271 | gameport_unregister_driver(&cobra_drv); | ||
272 | } | ||
273 | |||
274 | module_init(cobra_init); | ||
275 | module_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 | ||
376 | static int __init gf2k_init(void) | 376 | module_gameport_driver(gf2k_drv); |
377 | { | ||
378 | return gameport_register_driver(&gf2k_drv); | ||
379 | } | ||
380 | |||
381 | static void __exit gf2k_exit(void) | ||
382 | { | ||
383 | gameport_unregister_driver(&gf2k_drv); | ||
384 | } | ||
385 | |||
386 | module_init(gf2k_init); | ||
387 | module_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 | ||
427 | static int __init grip_init(void) | 427 | module_gameport_driver(grip_drv); |
428 | { | ||
429 | return gameport_register_driver(&grip_drv); | ||
430 | } | ||
431 | |||
432 | static void __exit grip_exit(void) | ||
433 | { | ||
434 | gameport_unregister_driver(&grip_drv); | ||
435 | } | ||
436 | |||
437 | module_init(grip_init); | ||
438 | module_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 | ||
690 | static int __init grip_init(void) | 690 | module_gameport_driver(grip_drv); |
691 | { | ||
692 | return gameport_register_driver(&grip_drv); | ||
693 | } | ||
694 | |||
695 | static void __exit grip_exit(void) | ||
696 | { | ||
697 | gameport_unregister_driver(&grip_drv); | ||
698 | } | ||
699 | |||
700 | module_init(grip_init); | ||
701 | module_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 | ||
284 | static int __init guillemot_init(void) | 284 | module_gameport_driver(guillemot_drv); |
285 | { | ||
286 | return gameport_register_driver(&guillemot_drv); | ||
287 | } | ||
288 | |||
289 | static void __exit guillemot_exit(void) | ||
290 | { | ||
291 | gameport_unregister_driver(&guillemot_drv); | ||
292 | } | ||
293 | |||
294 | module_init(guillemot_init); | ||
295 | module_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 | ||
314 | static int __init interact_init(void) | 314 | module_gameport_driver(interact_drv); |
315 | { | ||
316 | return gameport_register_driver(&interact_drv); | ||
317 | } | ||
318 | |||
319 | static void __exit interact_exit(void) | ||
320 | { | ||
321 | gameport_unregister_driver(&interact_drv); | ||
322 | } | ||
323 | |||
324 | module_init(interact_init); | ||
325 | module_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 | ||
162 | static int __init joydump_init(void) | 162 | module_gameport_driver(joydump_drv); |
163 | { | ||
164 | return gameport_register_driver(&joydump_drv); | ||
165 | } | ||
166 | |||
167 | static void __exit joydump_exit(void) | ||
168 | { | ||
169 | gameport_unregister_driver(&joydump_drv); | ||
170 | } | ||
171 | |||
172 | module_init(joydump_init); | ||
173 | module_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 | ||
823 | static int __init sw_init(void) | 823 | module_gameport_driver(sw_drv); |
824 | { | ||
825 | return gameport_register_driver(&sw_drv); | ||
826 | } | ||
827 | |||
828 | static void __exit sw_exit(void) | ||
829 | { | ||
830 | gameport_unregister_driver(&sw_drv); | ||
831 | } | ||
832 | |||
833 | module_init(sw_init); | ||
834 | module_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 | ||
439 | static int __init tmdc_init(void) | 439 | module_gameport_driver(tmdc_drv); |
440 | { | ||
441 | return gameport_register_driver(&tmdc_drv); | ||
442 | } | ||
443 | |||
444 | static void __exit tmdc_exit(void) | ||
445 | { | ||
446 | gameport_unregister_driver(&tmdc_drv); | ||
447 | } | ||
448 | |||
449 | module_init(tmdc_init); | ||
450 | module_exit(tmdc_exit); | ||