Input: serio - use macro module_platform_driver()
Commit 940ab88962
introduced a new macro to
save some platform_driver boilerplate code. Use it.
Signed-off-by: JJ Ding <dgdunix@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
This commit is contained in:
parent
4fcdeac5ac
commit
24d2469a33
|
@ -196,18 +196,7 @@ static struct platform_driver altera_ps2_driver = {
|
||||||
.of_match_table = altera_ps2_match,
|
.of_match_table = altera_ps2_match,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
module_platform_driver(altera_ps2_driver);
|
||||||
static int __init altera_ps2_init(void)
|
|
||||||
{
|
|
||||||
return platform_driver_register(&altera_ps2_driver);
|
|
||||||
}
|
|
||||||
module_init(altera_ps2_init);
|
|
||||||
|
|
||||||
static void __exit altera_ps2_exit(void)
|
|
||||||
{
|
|
||||||
platform_driver_unregister(&altera_ps2_driver);
|
|
||||||
}
|
|
||||||
module_exit(altera_ps2_exit);
|
|
||||||
|
|
||||||
MODULE_DESCRIPTION("Altera University Program PS2 controller driver");
|
MODULE_DESCRIPTION("Altera University Program PS2 controller driver");
|
||||||
MODULE_AUTHOR("Thomas Chou <thomas@wytron.com.tw>");
|
MODULE_AUTHOR("Thomas Chou <thomas@wytron.com.tw>");
|
||||||
|
|
|
@ -358,19 +358,7 @@ static struct platform_driver psif_driver = {
|
||||||
.suspend = psif_suspend,
|
.suspend = psif_suspend,
|
||||||
.resume = psif_resume,
|
.resume = psif_resume,
|
||||||
};
|
};
|
||||||
|
module_platform_driver(psif_driver);
|
||||||
static int __init psif_init(void)
|
|
||||||
{
|
|
||||||
return platform_driver_probe(&psif_driver, psif_probe);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void __exit psif_exit(void)
|
|
||||||
{
|
|
||||||
platform_driver_unregister(&psif_driver);
|
|
||||||
}
|
|
||||||
|
|
||||||
module_init(psif_init);
|
|
||||||
module_exit(psif_exit);
|
|
||||||
|
|
||||||
MODULE_AUTHOR("Hans-Christian Egtvedt <egtvedt@samfundet.no>");
|
MODULE_AUTHOR("Hans-Christian Egtvedt <egtvedt@samfundet.no>");
|
||||||
MODULE_DESCRIPTION("Atmel AVR32 PSIF PS/2 driver");
|
MODULE_DESCRIPTION("Atmel AVR32 PSIF PS/2 driver");
|
||||||
|
|
|
@ -143,16 +143,4 @@ static struct platform_driver rpckbd_driver = {
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
module_platform_driver(rpckbd_driver);
|
||||||
static int __init rpckbd_init(void)
|
|
||||||
{
|
|
||||||
return platform_driver_register(&rpckbd_driver);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void __exit rpckbd_exit(void)
|
|
||||||
{
|
|
||||||
platform_driver_unregister(&rpckbd_driver);
|
|
||||||
}
|
|
||||||
|
|
||||||
module_init(rpckbd_init);
|
|
||||||
module_exit(rpckbd_exit);
|
|
||||||
|
|
|
@ -369,19 +369,7 @@ static struct platform_driver xps2_of_driver = {
|
||||||
.probe = xps2_of_probe,
|
.probe = xps2_of_probe,
|
||||||
.remove = __devexit_p(xps2_of_remove),
|
.remove = __devexit_p(xps2_of_remove),
|
||||||
};
|
};
|
||||||
|
module_platform_driver(xps2_of_driver);
|
||||||
static int __init xps2_init(void)
|
|
||||||
{
|
|
||||||
return platform_driver_register(&xps2_of_driver);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void __exit xps2_cleanup(void)
|
|
||||||
{
|
|
||||||
platform_driver_unregister(&xps2_of_driver);
|
|
||||||
}
|
|
||||||
|
|
||||||
module_init(xps2_init);
|
|
||||||
module_exit(xps2_cleanup);
|
|
||||||
|
|
||||||
MODULE_AUTHOR("Xilinx, Inc.");
|
MODULE_AUTHOR("Xilinx, Inc.");
|
||||||
MODULE_DESCRIPTION("Xilinx XPS PS/2 driver");
|
MODULE_DESCRIPTION("Xilinx XPS PS/2 driver");
|
||||||
|
|
Reference in New Issue