diff options
author | JJ Ding <dgdunix@gmail.com> | 2011-11-29 14:08:43 -0500 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2011-12-01 02:41:43 -0500 |
commit | 24d2469a33112bbce008a15bc4210cc60ffd7443 (patch) | |
tree | 59ff3ee0827c39fca1ca35b92859b15b0a707ae0 /drivers | |
parent | 4fcdeac5acf4a7a81efc409c02a79a76fa339c27 (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.c | 13 | ||||
-rw-r--r-- | drivers/input/serio/at32psif.c | 14 | ||||
-rw-r--r-- | drivers/input/serio/rpckbd.c | 14 | ||||
-rw-r--r-- | drivers/input/serio/xilinx_ps2.c | 14 |
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 | 199 | module_platform_driver(altera_ps2_driver); | |
200 | static int __init altera_ps2_init(void) | ||
201 | { | ||
202 | return platform_driver_register(&altera_ps2_driver); | ||
203 | } | ||
204 | module_init(altera_ps2_init); | ||
205 | |||
206 | static void __exit altera_ps2_exit(void) | ||
207 | { | ||
208 | platform_driver_unregister(&altera_ps2_driver); | ||
209 | } | ||
210 | module_exit(altera_ps2_exit); | ||
211 | 200 | ||
212 | MODULE_DESCRIPTION("Altera University Program PS2 controller driver"); | 201 | MODULE_DESCRIPTION("Altera University Program PS2 controller driver"); |
213 | MODULE_AUTHOR("Thomas Chou <thomas@wytron.com.tw>"); | 202 | MODULE_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 | 361 | module_platform_driver(psif_driver); | |
362 | static int __init psif_init(void) | ||
363 | { | ||
364 | return platform_driver_probe(&psif_driver, psif_probe); | ||
365 | } | ||
366 | |||
367 | static void __exit psif_exit(void) | ||
368 | { | ||
369 | platform_driver_unregister(&psif_driver); | ||
370 | } | ||
371 | |||
372 | module_init(psif_init); | ||
373 | module_exit(psif_exit); | ||
374 | 362 | ||
375 | MODULE_AUTHOR("Hans-Christian Egtvedt <egtvedt@samfundet.no>"); | 363 | MODULE_AUTHOR("Hans-Christian Egtvedt <egtvedt@samfundet.no>"); |
376 | MODULE_DESCRIPTION("Atmel AVR32 PSIF PS/2 driver"); | 364 | MODULE_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 | 146 | module_platform_driver(rpckbd_driver); | |
147 | static int __init rpckbd_init(void) | ||
148 | { | ||
149 | return platform_driver_register(&rpckbd_driver); | ||
150 | } | ||
151 | |||
152 | static void __exit rpckbd_exit(void) | ||
153 | { | ||
154 | platform_driver_unregister(&rpckbd_driver); | ||
155 | } | ||
156 | |||
157 | module_init(rpckbd_init); | ||
158 | module_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 | 372 | module_platform_driver(xps2_of_driver); | |
373 | static int __init xps2_init(void) | ||
374 | { | ||
375 | return platform_driver_register(&xps2_of_driver); | ||
376 | } | ||
377 | |||
378 | static void __exit xps2_cleanup(void) | ||
379 | { | ||
380 | platform_driver_unregister(&xps2_of_driver); | ||
381 | } | ||
382 | |||
383 | module_init(xps2_init); | ||
384 | module_exit(xps2_cleanup); | ||
385 | 373 | ||
386 | MODULE_AUTHOR("Xilinx, Inc."); | 374 | MODULE_AUTHOR("Xilinx, Inc."); |
387 | MODULE_DESCRIPTION("Xilinx XPS PS/2 driver"); | 375 | MODULE_DESCRIPTION("Xilinx XPS PS/2 driver"); |