Input: serio - use macro module_platform_driver()
authorJJ Ding <dgdunix@gmail.com>
Tue, 29 Nov 2011 19:08:43 +0000 (11:08 -0800)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Thu, 1 Dec 2011 07:41:43 +0000 (23:41 -0800)
Commit 940ab88962bc1aff3273a8356d64577a6e386736 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>
drivers/input/serio/altera_ps2.c
drivers/input/serio/at32psif.c
drivers/input/serio/rpckbd.c
drivers/input/serio/xilinx_ps2.c

index d363dc4571a381e47efc8d1e912e0c5eca8177a1..35864c6130bb0b5723eed9f2fcc8408868f36bef 100644 (file)
@@ -196,18 +196,7 @@ static struct platform_driver altera_ps2_driver = {
                .of_match_table = altera_ps2_match,
        },
 };
-
-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_platform_driver(altera_ps2_driver);
 
 MODULE_DESCRIPTION("Altera University Program PS2 controller driver");
 MODULE_AUTHOR("Thomas Chou <thomas@wytron.com.tw>");
index 95280f9207e14cf4d552aaa7cf8b7b3704fc123f..421a7442e4641f92e73aa231cefe1de805a87fd2 100644 (file)
@@ -358,19 +358,7 @@ static struct platform_driver psif_driver = {
        .suspend        = psif_suspend,
        .resume         = psif_resume,
 };
-
-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_platform_driver(psif_driver);
 
 MODULE_AUTHOR("Hans-Christian Egtvedt <egtvedt@samfundet.no>");
 MODULE_DESCRIPTION("Atmel AVR32 PSIF PS/2 driver");
index 7ec3c97dc1b9b5f2198af4338db7c48ca7ec9abd..8b44ddc8041ce4c1cf410435585caeb8f379193a 100644 (file)
@@ -143,16 +143,4 @@ static struct platform_driver rpckbd_driver = {
                .owner  = THIS_MODULE,
        },
 };
-
-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);
+module_platform_driver(rpckbd_driver);
index d64c5a43aaad238671f3958e9d0bd6e08da5010f..127c391decedc319f00d014bf2967a0eb2ac6cd0 100644 (file)
@@ -369,19 +369,7 @@ static struct platform_driver xps2_of_driver = {
        .probe          = xps2_of_probe,
        .remove         = __devexit_p(xps2_of_remove),
 };
-
-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_platform_driver(xps2_of_driver);
 
 MODULE_AUTHOR("Xilinx, Inc.");
 MODULE_DESCRIPTION("Xilinx XPS PS/2 driver");