提交 98a84131 编写于 作者: A Axel Lin 提交者: 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: NAxel Lin <axel.lin@gmail.com>
Signed-off-by: NDmitry Torokhov <dtor@mail.ru>
上级 45b2604e
......@@ -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);
......@@ -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);
......@@ -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);
......@@ -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);
......@@ -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);
......@@ -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);
......@@ -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);
......@@ -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);
......@@ -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);
......@@ -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);
......@@ -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);
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册