Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

JJ Ding and committed by
Dmitry Torokhov
24d2469a 4fcdeac5

+4 -51
+1 -12
drivers/input/serio/altera_ps2.c
··· 196 196 .of_match_table = altera_ps2_match, 197 197 }, 198 198 }; 199 - 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); 199 + module_platform_driver(altera_ps2_driver); 211 200 212 201 MODULE_DESCRIPTION("Altera University Program PS2 controller driver"); 213 202 MODULE_AUTHOR("Thomas Chou <thomas@wytron.com.tw>");
+1 -13
drivers/input/serio/at32psif.c
··· 358 358 .suspend = psif_suspend, 359 359 .resume = psif_resume, 360 360 }; 361 - 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); 361 + module_platform_driver(psif_driver); 374 362 375 363 MODULE_AUTHOR("Hans-Christian Egtvedt <egtvedt@samfundet.no>"); 376 364 MODULE_DESCRIPTION("Atmel AVR32 PSIF PS/2 driver");
+1 -13
drivers/input/serio/rpckbd.c
··· 143 143 .owner = THIS_MODULE, 144 144 }, 145 145 }; 146 - 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); 146 + module_platform_driver(rpckbd_driver);
+1 -13
drivers/input/serio/xilinx_ps2.c
··· 369 369 .probe = xps2_of_probe, 370 370 .remove = __devexit_p(xps2_of_remove), 371 371 }; 372 - 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); 372 + module_platform_driver(xps2_of_driver); 385 373 386 374 MODULE_AUTHOR("Xilinx, Inc."); 387 375 MODULE_DESCRIPTION("Xilinx XPS PS/2 driver");