aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJJ Ding <dgdunix@gmail.com>2011-11-29 14:08:43 -0500
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2011-12-01 02:41:43 -0500
commit24d2469a33112bbce008a15bc4210cc60ffd7443 (patch)
tree59ff3ee0827c39fca1ca35b92859b15b0a707ae0 /drivers
parent4fcdeac5acf4a7a81efc409c02a79a76fa339c27 (diff)
Input: serio - use macro module_platform_driver()
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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/input/serio/altera_ps2.c13
-rw-r--r--drivers/input/serio/at32psif.c14
-rw-r--r--drivers/input/serio/rpckbd.c14
-rw-r--r--drivers/input/serio/xilinx_ps2.c14
4 files changed, 4 insertions, 51 deletions
diff --git a/drivers/input/serio/altera_ps2.c b/drivers/input/serio/altera_ps2.c
index d363dc4571a3..35864c6130bb 100644
--- a/drivers/input/serio/altera_ps2.c
+++ b/drivers/input/serio/altera_ps2.c
@@ -196,18 +196,7 @@ static struct platform_driver altera_ps2_driver = {
196 .of_match_table = altera_ps2_match, 196 .of_match_table = altera_ps2_match,
197 }, 197 },
198}; 198};
199 199module_platform_driver(altera_ps2_driver);
200static int __init altera_ps2_init(void)
201{
202 return platform_driver_register(&altera_ps2_driver);
203}
204module_init(altera_ps2_init);
205
206static void __exit altera_ps2_exit(void)
207{
208 platform_driver_unregister(&altera_ps2_driver);
209}
210module_exit(altera_ps2_exit);
211 200
212MODULE_DESCRIPTION("Altera University Program PS2 controller driver"); 201MODULE_DESCRIPTION("Altera University Program PS2 controller driver");
213MODULE_AUTHOR("Thomas Chou <thomas@wytron.com.tw>"); 202MODULE_AUTHOR("Thomas Chou <thomas@wytron.com.tw>");
diff --git a/drivers/input/serio/at32psif.c b/drivers/input/serio/at32psif.c
index 95280f9207e1..421a7442e464 100644
--- a/drivers/input/serio/at32psif.c
+++ b/drivers/input/serio/at32psif.c
@@ -358,19 +358,7 @@ static struct platform_driver psif_driver = {
358 .suspend = psif_suspend, 358 .suspend = psif_suspend,
359 .resume = psif_resume, 359 .resume = psif_resume,
360}; 360};
361 361module_platform_driver(psif_driver);
362static int __init psif_init(void)
363{
364 return platform_driver_probe(&psif_driver, psif_probe);
365}
366
367static void __exit psif_exit(void)
368{
369 platform_driver_unregister(&psif_driver);
370}
371
372module_init(psif_init);
373module_exit(psif_exit);
374 362
375MODULE_AUTHOR("Hans-Christian Egtvedt <egtvedt@samfundet.no>"); 363MODULE_AUTHOR("Hans-Christian Egtvedt <egtvedt@samfundet.no>");
376MODULE_DESCRIPTION("Atmel AVR32 PSIF PS/2 driver"); 364MODULE_DESCRIPTION("Atmel AVR32 PSIF PS/2 driver");
diff --git a/drivers/input/serio/rpckbd.c b/drivers/input/serio/rpckbd.c
index 7ec3c97dc1b9..8b44ddc8041c 100644
--- a/drivers/input/serio/rpckbd.c
+++ b/drivers/input/serio/rpckbd.c
@@ -143,16 +143,4 @@ static struct platform_driver rpckbd_driver = {
143 .owner = THIS_MODULE, 143 .owner = THIS_MODULE,
144 }, 144 },
145}; 145};
146 146module_platform_driver(rpckbd_driver);
147static int __init rpckbd_init(void)
148{
149 return platform_driver_register(&rpckbd_driver);
150}
151
152static void __exit rpckbd_exit(void)
153{
154 platform_driver_unregister(&rpckbd_driver);
155}
156
157module_init(rpckbd_init);
158module_exit(rpckbd_exit);
diff --git a/drivers/input/serio/xilinx_ps2.c b/drivers/input/serio/xilinx_ps2.c
index d64c5a43aaad..127c391deced 100644
--- a/drivers/input/serio/xilinx_ps2.c
+++ b/drivers/input/serio/xilinx_ps2.c
@@ -369,19 +369,7 @@ static struct platform_driver xps2_of_driver = {
369 .probe = xps2_of_probe, 369 .probe = xps2_of_probe,
370 .remove = __devexit_p(xps2_of_remove), 370 .remove = __devexit_p(xps2_of_remove),
371}; 371};
372 372module_platform_driver(xps2_of_driver);
373static int __init xps2_init(void)
374{
375 return platform_driver_register(&xps2_of_driver);
376}
377
378static void __exit xps2_cleanup(void)
379{
380 platform_driver_unregister(&xps2_of_driver);
381}
382
383module_init(xps2_init);
384module_exit(xps2_cleanup);
385 373
386MODULE_AUTHOR("Xilinx, Inc."); 374MODULE_AUTHOR("Xilinx, Inc.");
387MODULE_DESCRIPTION("Xilinx XPS PS/2 driver"); 375MODULE_DESCRIPTION("Xilinx XPS PS/2 driver");