Commit 98a84131 authored by Axel Lin's avatar Axel Lin Committed by Dmitry Torokhov

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: default avatarAxel Lin <axel.lin@gmail.com>
Signed-off-by: default avatarDmitry Torokhov <dtor@mail.ru>
parent 45b2604e
...@@ -413,15 +413,4 @@ static struct gameport_driver a3d_drv = { ...@@ -413,15 +413,4 @@ static struct gameport_driver a3d_drv = {
.disconnect = a3d_disconnect, .disconnect = a3d_disconnect,
}; };
static int __init a3d_init(void) module_gameport_driver(a3d_drv);
{
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);
...@@ -557,10 +557,6 @@ static void adi_disconnect(struct gameport *gameport) ...@@ -557,10 +557,6 @@ static void adi_disconnect(struct gameport *gameport)
kfree(port); kfree(port);
} }
/*
* The gameport device structure.
*/
static struct gameport_driver adi_drv = { static struct gameport_driver adi_drv = {
.driver = { .driver = {
.name = "adi", .name = "adi",
...@@ -570,15 +566,4 @@ static struct gameport_driver adi_drv = { ...@@ -570,15 +566,4 @@ static struct gameport_driver adi_drv = {
.disconnect = adi_disconnect, .disconnect = adi_disconnect,
}; };
static int __init adi_init(void) module_gameport_driver(adi_drv);
{
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);
...@@ -261,15 +261,4 @@ static struct gameport_driver cobra_drv = { ...@@ -261,15 +261,4 @@ static struct gameport_driver cobra_drv = {
.disconnect = cobra_disconnect, .disconnect = cobra_disconnect,
}; };
static int __init cobra_init(void) module_gameport_driver(cobra_drv);
{
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);
...@@ -373,15 +373,4 @@ static struct gameport_driver gf2k_drv = { ...@@ -373,15 +373,4 @@ static struct gameport_driver gf2k_drv = {
.disconnect = gf2k_disconnect, .disconnect = gf2k_disconnect,
}; };
static int __init gf2k_init(void) module_gameport_driver(gf2k_drv);
{
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);
...@@ -424,15 +424,4 @@ static struct gameport_driver grip_drv = { ...@@ -424,15 +424,4 @@ static struct gameport_driver grip_drv = {
.disconnect = grip_disconnect, .disconnect = grip_disconnect,
}; };
static int __init grip_init(void) module_gameport_driver(grip_drv);
{
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);
...@@ -687,15 +687,4 @@ static struct gameport_driver grip_drv = { ...@@ -687,15 +687,4 @@ static struct gameport_driver grip_drv = {
.disconnect = grip_disconnect, .disconnect = grip_disconnect,
}; };
static int __init grip_init(void) module_gameport_driver(grip_drv);
{
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);
...@@ -281,15 +281,4 @@ static struct gameport_driver guillemot_drv = { ...@@ -281,15 +281,4 @@ static struct gameport_driver guillemot_drv = {
.disconnect = guillemot_disconnect, .disconnect = guillemot_disconnect,
}; };
static int __init guillemot_init(void) module_gameport_driver(guillemot_drv);
{
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);
...@@ -311,15 +311,4 @@ static struct gameport_driver interact_drv = { ...@@ -311,15 +311,4 @@ static struct gameport_driver interact_drv = {
.disconnect = interact_disconnect, .disconnect = interact_disconnect,
}; };
static int __init interact_init(void) module_gameport_driver(interact_drv);
{
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);
...@@ -159,15 +159,4 @@ static struct gameport_driver joydump_drv = { ...@@ -159,15 +159,4 @@ static struct gameport_driver joydump_drv = {
.disconnect = joydump_disconnect, .disconnect = joydump_disconnect,
}; };
static int __init joydump_init(void) module_gameport_driver(joydump_drv);
{
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);
...@@ -820,15 +820,4 @@ static struct gameport_driver sw_drv = { ...@@ -820,15 +820,4 @@ static struct gameport_driver sw_drv = {
.disconnect = sw_disconnect, .disconnect = sw_disconnect,
}; };
static int __init sw_init(void) module_gameport_driver(sw_drv);
{
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);
...@@ -436,15 +436,4 @@ static struct gameport_driver tmdc_drv = { ...@@ -436,15 +436,4 @@ static struct gameport_driver tmdc_drv = {
.disconnect = tmdc_disconnect, .disconnect = tmdc_disconnect,
}; };
static int __init tmdc_init(void) module_gameport_driver(tmdc_drv);
{
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);
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment