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

Input: keyboard - 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
5146c84f 3bfd5c5b

+26 -327
+1 -12
drivers/input/keyboard/adp5520-keys.c
··· 202 202 .probe = adp5520_keys_probe, 203 203 .remove = __devexit_p(adp5520_keys_remove), 204 204 }; 205 - 206 - static int __init adp5520_keys_init(void) 207 - { 208 - return platform_driver_register(&adp5520_keys_driver); 209 - } 210 - module_init(adp5520_keys_init); 211 - 212 - static void __exit adp5520_keys_exit(void) 213 - { 214 - platform_driver_unregister(&adp5520_keys_driver); 215 - } 216 - module_exit(adp5520_keys_exit); 205 + module_platform_driver(adp5520_keys_driver); 217 206 218 207 MODULE_AUTHOR("Michael Hennerich <hennerich@blackfin.uclinux.org>"); 219 208 MODULE_DESCRIPTION("Keys ADP5520 Driver");
+1 -14
drivers/input/keyboard/amikbd.c
··· 259 259 .owner = THIS_MODULE, 260 260 }, 261 261 }; 262 - 263 - static int __init amikbd_init(void) 264 - { 265 - return platform_driver_probe(&amikbd_driver, amikbd_probe); 266 - } 267 - 268 - module_init(amikbd_init); 269 - 270 - static void __exit amikbd_exit(void) 271 - { 272 - platform_driver_unregister(&amikbd_driver); 273 - } 274 - 275 - module_exit(amikbd_exit); 262 + module_platform_driver(amikbd_driver); 276 263 277 264 MODULE_ALIAS("platform:amiga-keyboard");
+1 -13
drivers/input/keyboard/bf54x-keys.c
··· 394 394 .suspend = bfin_kpad_suspend, 395 395 .resume = bfin_kpad_resume, 396 396 }; 397 - 398 - static int __init bfin_kpad_init(void) 399 - { 400 - return platform_driver_register(&bfin_kpad_device_driver); 401 - } 402 - 403 - static void __exit bfin_kpad_exit(void) 404 - { 405 - platform_driver_unregister(&bfin_kpad_device_driver); 406 - } 407 - 408 - module_init(bfin_kpad_init); 409 - module_exit(bfin_kpad_exit); 397 + module_platform_driver(bfin_kpad_device_driver); 410 398 411 399 MODULE_LICENSE("GPL"); 412 400 MODULE_AUTHOR("Michael Hennerich <hennerich@blackfin.uclinux.org>");
+1 -12
drivers/input/keyboard/davinci_keyscan.c
··· 328 328 }, 329 329 .remove = __devexit_p(davinci_ks_remove), 330 330 }; 331 - 332 - static int __init davinci_ks_init(void) 333 - { 334 - return platform_driver_probe(&davinci_ks_driver, davinci_ks_probe); 335 - } 336 - module_init(davinci_ks_init); 337 - 338 - static void __exit davinci_ks_exit(void) 339 - { 340 - platform_driver_unregister(&davinci_ks_driver); 341 - } 342 - module_exit(davinci_ks_exit); 331 + module_platform_driver(davinci_ks_driver); 343 332 344 333 MODULE_AUTHOR("Miguel Aguilar"); 345 334 MODULE_DESCRIPTION("Texas Instruments DaVinci Key Scan Driver");
+1 -13
drivers/input/keyboard/ep93xx_keypad.c
··· 390 390 .suspend = ep93xx_keypad_suspend, 391 391 .resume = ep93xx_keypad_resume, 392 392 }; 393 - 394 - static int __init ep93xx_keypad_init(void) 395 - { 396 - return platform_driver_register(&ep93xx_keypad_driver); 397 - } 398 - 399 - static void __exit ep93xx_keypad_exit(void) 400 - { 401 - platform_driver_unregister(&ep93xx_keypad_driver); 402 - } 403 - 404 - module_init(ep93xx_keypad_init); 405 - module_exit(ep93xx_keypad_exit); 393 + module_platform_driver(ep93xx_keypad_driver); 406 394 407 395 MODULE_LICENSE("GPL"); 408 396 MODULE_AUTHOR("H Hartley Sweeten <hsweeten@visionengravers.com>");
+1 -13
drivers/input/keyboard/gpio_keys_polled.c
··· 241 241 .owner = THIS_MODULE, 242 242 }, 243 243 }; 244 - 245 - static int __init gpio_keys_polled_init(void) 246 - { 247 - return platform_driver_register(&gpio_keys_polled_driver); 248 - } 249 - 250 - static void __exit gpio_keys_polled_exit(void) 251 - { 252 - platform_driver_unregister(&gpio_keys_polled_driver); 253 - } 254 - 255 - module_init(gpio_keys_polled_init); 256 - module_exit(gpio_keys_polled_exit); 244 + module_platform_driver(gpio_keys_polled_driver); 257 245 258 246 MODULE_LICENSE("GPL v2"); 259 247 MODULE_AUTHOR("Gabor Juhos <juhosg@openwrt.org>");
+1 -13
drivers/input/keyboard/imx_keypad.c
··· 619 619 .probe = imx_keypad_probe, 620 620 .remove = __devexit_p(imx_keypad_remove), 621 621 }; 622 - 623 - static int __init imx_keypad_init(void) 624 - { 625 - return platform_driver_register(&imx_keypad_driver); 626 - } 627 - 628 - static void __exit imx_keypad_exit(void) 629 - { 630 - platform_driver_unregister(&imx_keypad_driver); 631 - } 632 - 633 - module_init(imx_keypad_init); 634 - module_exit(imx_keypad_exit); 622 + module_platform_driver(imx_keypad_driver); 635 623 636 624 MODULE_AUTHOR("Alberto Panizzo <maramaopercheseimorto@gmail.com>"); 637 625 MODULE_DESCRIPTION("IMX Keypad Port Driver");
+1 -13
drivers/input/keyboard/jornada680_kbd.c
··· 260 260 .probe = jornada680kbd_probe, 261 261 .remove = __devexit_p(jornada680kbd_remove), 262 262 }; 263 - 264 - static int __init jornada680kbd_init(void) 265 - { 266 - return platform_driver_register(&jornada680kbd_driver); 267 - } 268 - 269 - static void __exit jornada680kbd_exit(void) 270 - { 271 - platform_driver_unregister(&jornada680kbd_driver); 272 - } 273 - 274 - module_init(jornada680kbd_init); 275 - module_exit(jornada680kbd_exit); 263 + module_platform_driver(jornada680kbd_driver); 276 264 277 265 MODULE_AUTHOR("Kristoffer Ericson <kristoffer.ericson@gmail.com>"); 278 266 MODULE_DESCRIPTION("HP Jornada 620/660/680/690 Keyboard Driver");
+1 -13
drivers/input/keyboard/jornada720_kbd.c
··· 174 174 .probe = jornada720_kbd_probe, 175 175 .remove = __devexit_p(jornada720_kbd_remove), 176 176 }; 177 - 178 - static int __init jornada720_kbd_init(void) 179 - { 180 - return platform_driver_register(&jornada720_kbd_driver); 181 - } 182 - 183 - static void __exit jornada720_kbd_exit(void) 184 - { 185 - platform_driver_unregister(&jornada720_kbd_driver); 186 - } 187 - 188 - module_init(jornada720_kbd_init); 189 - module_exit(jornada720_kbd_exit); 177 + module_platform_driver(jornada720_kbd_driver);
+1 -13
drivers/input/keyboard/matrix_keypad.c
··· 496 496 #endif 497 497 }, 498 498 }; 499 - 500 - static int __init matrix_keypad_init(void) 501 - { 502 - return platform_driver_register(&matrix_keypad_driver); 503 - } 504 - 505 - static void __exit matrix_keypad_exit(void) 506 - { 507 - platform_driver_unregister(&matrix_keypad_driver); 508 - } 509 - 510 - module_init(matrix_keypad_init); 511 - module_exit(matrix_keypad_exit); 499 + module_platform_driver(matrix_keypad_driver); 512 500 513 501 MODULE_AUTHOR("Marek Vasut <marek.vasut@gmail.com>"); 514 502 MODULE_DESCRIPTION("GPIO Driven Matrix Keypad Driver");
+1 -12
drivers/input/keyboard/nomadik-ske-keypad.c
··· 390 390 .probe = ske_keypad_probe, 391 391 .remove = __devexit_p(ske_keypad_remove), 392 392 }; 393 - 394 - static int __init ske_keypad_init(void) 395 - { 396 - return platform_driver_probe(&ske_keypad_driver, ske_keypad_probe); 397 - } 398 - module_init(ske_keypad_init); 399 - 400 - static void __exit ske_keypad_exit(void) 401 - { 402 - platform_driver_unregister(&ske_keypad_driver); 403 - } 404 - module_exit(ske_keypad_exit); 393 + module_platform_driver(ske_keypad_driver); 405 394 406 395 MODULE_LICENSE("GPL v2"); 407 396 MODULE_AUTHOR("Naveen Kumar <naveen.gaddipati@stericsson.com> / Sundar Iyer <sundar.iyer@stericsson.com>");
+1 -14
drivers/input/keyboard/omap-keypad.c
··· 473 473 .owner = THIS_MODULE, 474 474 }, 475 475 }; 476 - 477 - static int __init omap_kp_init(void) 478 - { 479 - printk(KERN_INFO "OMAP Keypad Driver\n"); 480 - return platform_driver_register(&omap_kp_driver); 481 - } 482 - 483 - static void __exit omap_kp_exit(void) 484 - { 485 - platform_driver_unregister(&omap_kp_driver); 486 - } 487 - 488 - module_init(omap_kp_init); 489 - module_exit(omap_kp_exit); 476 + module_platform_driver(omap_kp_driver); 490 477 491 478 MODULE_AUTHOR("Timo Teräs"); 492 479 MODULE_DESCRIPTION("OMAP Keypad Driver");
+1 -12
drivers/input/keyboard/omap4-keypad.c
··· 335 335 .owner = THIS_MODULE, 336 336 }, 337 337 }; 338 - 339 - static int __init omap4_keypad_init(void) 340 - { 341 - return platform_driver_register(&omap4_keypad_driver); 342 - } 343 - module_init(omap4_keypad_init); 344 - 345 - static void __exit omap4_keypad_exit(void) 346 - { 347 - platform_driver_unregister(&omap4_keypad_driver); 348 - } 349 - module_exit(omap4_keypad_exit); 338 + module_platform_driver(omap4_keypad_driver); 350 339 351 340 MODULE_AUTHOR("Texas Instruments"); 352 341 MODULE_DESCRIPTION("OMAP4 Keypad Driver");
+1 -12
drivers/input/keyboard/opencores-kbd.c
··· 163 163 .name = "opencores-kbd", 164 164 }, 165 165 }; 166 - 167 - static int __init opencores_kbd_init(void) 168 - { 169 - return platform_driver_register(&opencores_kbd_device_driver); 170 - } 171 - module_init(opencores_kbd_init); 172 - 173 - static void __exit opencores_kbd_exit(void) 174 - { 175 - platform_driver_unregister(&opencores_kbd_device_driver); 176 - } 177 - module_exit(opencores_kbd_exit); 166 + module_platform_driver(opencores_kbd_device_driver); 178 167 179 168 MODULE_LICENSE("GPL"); 180 169 MODULE_AUTHOR("Javier Herrero <jherrero@hvsistemas.es>");
+1 -12
drivers/input/keyboard/pmic8xxx-keypad.c
··· 780 780 .pm = &pm8xxx_kp_pm_ops, 781 781 }, 782 782 }; 783 - 784 - static int __init pmic8xxx_kp_init(void) 785 - { 786 - return platform_driver_register(&pmic8xxx_kp_driver); 787 - } 788 - module_init(pmic8xxx_kp_init); 789 - 790 - static void __exit pmic8xxx_kp_exit(void) 791 - { 792 - platform_driver_unregister(&pmic8xxx_kp_driver); 793 - } 794 - module_exit(pmic8xxx_kp_exit); 783 + module_platform_driver(pmic8xxx_kp_driver); 795 784 796 785 MODULE_LICENSE("GPL v2"); 797 786 MODULE_DESCRIPTION("PMIC8XXX keypad driver");
+1 -13
drivers/input/keyboard/pxa27x_keypad.c
··· 602 602 #endif 603 603 }, 604 604 }; 605 - 606 - static int __init pxa27x_keypad_init(void) 607 - { 608 - return platform_driver_register(&pxa27x_keypad_driver); 609 - } 610 - 611 - static void __exit pxa27x_keypad_exit(void) 612 - { 613 - platform_driver_unregister(&pxa27x_keypad_driver); 614 - } 615 - 616 - module_init(pxa27x_keypad_init); 617 - module_exit(pxa27x_keypad_exit); 605 + module_platform_driver(pxa27x_keypad_driver); 618 606 619 607 MODULE_DESCRIPTION("PXA27x Keypad Controller Driver"); 620 608 MODULE_LICENSE("GPL");
+1 -12
drivers/input/keyboard/pxa930_rotary.c
··· 195 195 .probe = pxa930_rotary_probe, 196 196 .remove = __devexit_p(pxa930_rotary_remove), 197 197 }; 198 - 199 - static int __init pxa930_rotary_init(void) 200 - { 201 - return platform_driver_register(&pxa930_rotary_driver); 202 - } 203 - module_init(pxa930_rotary_init); 204 - 205 - static void __exit pxa930_rotary_exit(void) 206 - { 207 - platform_driver_unregister(&pxa930_rotary_driver); 208 - } 209 - module_exit(pxa930_rotary_exit); 198 + module_platform_driver(pxa930_rotary_driver); 210 199 211 200 MODULE_LICENSE("GPL"); 212 201 MODULE_DESCRIPTION("Driver for PXA93x Enhanced Rotary Controller");
+1 -12
drivers/input/keyboard/samsung-keypad.c
··· 467 467 }, 468 468 .id_table = samsung_keypad_driver_ids, 469 469 }; 470 - 471 - static int __init samsung_keypad_init(void) 472 - { 473 - return platform_driver_register(&samsung_keypad_driver); 474 - } 475 - module_init(samsung_keypad_init); 476 - 477 - static void __exit samsung_keypad_exit(void) 478 - { 479 - platform_driver_unregister(&samsung_keypad_driver); 480 - } 481 - module_exit(samsung_keypad_exit); 470 + module_platform_driver(samsung_keypad_driver); 482 471 483 472 MODULE_DESCRIPTION("Samsung keypad driver"); 484 473 MODULE_AUTHOR("Joonyoung Shim <jy0922.shim@samsung.com>");
+1 -13
drivers/input/keyboard/sh_keysc.c
··· 337 337 .pm = &sh_keysc_dev_pm_ops, 338 338 } 339 339 }; 340 - 341 - static int __init sh_keysc_init(void) 342 - { 343 - return platform_driver_register(&sh_keysc_device_driver); 344 - } 345 - 346 - static void __exit sh_keysc_exit(void) 347 - { 348 - platform_driver_unregister(&sh_keysc_device_driver); 349 - } 350 - 351 - module_init(sh_keysc_init); 352 - module_exit(sh_keysc_exit); 340 + module_platform_driver(sh_keysc_device_driver); 353 341 354 342 MODULE_AUTHOR("Magnus Damm"); 355 343 MODULE_DESCRIPTION("SuperH KEYSC Keypad Driver");
+1 -12
drivers/input/keyboard/spear-keyboard.c
··· 326 326 #endif 327 327 }, 328 328 }; 329 - 330 - static int __init spear_kbd_init(void) 331 - { 332 - return platform_driver_register(&spear_kbd_driver); 333 - } 334 - module_init(spear_kbd_init); 335 - 336 - static void __exit spear_kbd_exit(void) 337 - { 338 - platform_driver_unregister(&spear_kbd_driver); 339 - } 340 - module_exit(spear_kbd_exit); 329 + module_platform_driver(spear_kbd_driver); 341 330 342 331 MODULE_AUTHOR("Rajeev Kumar"); 343 332 MODULE_DESCRIPTION("SPEAr Keyboard Driver");
+1 -12
drivers/input/keyboard/stmpe-keypad.c
··· 368 368 .probe = stmpe_keypad_probe, 369 369 .remove = __devexit_p(stmpe_keypad_remove), 370 370 }; 371 - 372 - static int __init stmpe_keypad_init(void) 373 - { 374 - return platform_driver_register(&stmpe_keypad_driver); 375 - } 376 - module_init(stmpe_keypad_init); 377 - 378 - static void __exit stmpe_keypad_exit(void) 379 - { 380 - platform_driver_unregister(&stmpe_keypad_driver); 381 - } 382 - module_exit(stmpe_keypad_exit); 371 + module_platform_driver(stmpe_keypad_driver); 383 372 384 373 MODULE_LICENSE("GPL v2"); 385 374 MODULE_DESCRIPTION("STMPExxxx keypad driver");
+1 -12
drivers/input/keyboard/tc3589x-keypad.c
··· 453 453 .probe = tc3589x_keypad_probe, 454 454 .remove = __devexit_p(tc3589x_keypad_remove), 455 455 }; 456 - 457 - static int __init tc3589x_keypad_init(void) 458 - { 459 - return platform_driver_register(&tc3589x_keypad_driver); 460 - } 461 - module_init(tc3589x_keypad_init); 462 - 463 - static void __exit tc3589x_keypad_exit(void) 464 - { 465 - return platform_driver_unregister(&tc3589x_keypad_driver); 466 - } 467 - module_exit(tc3589x_keypad_exit); 456 + module_platform_driver(tc3589x_keypad_driver); 468 457 469 458 MODULE_LICENSE("GPL v2"); 470 459 MODULE_AUTHOR("Jayeeta Banerjee/Sundar Iyer");
+1 -12
drivers/input/keyboard/tegra-kbc.c
··· 802 802 .pm = &tegra_kbc_pm_ops, 803 803 }, 804 804 }; 805 - 806 - static void __exit tegra_kbc_exit(void) 807 - { 808 - platform_driver_unregister(&tegra_kbc_driver); 809 - } 810 - module_exit(tegra_kbc_exit); 811 - 812 - static int __init tegra_kbc_init(void) 813 - { 814 - return platform_driver_register(&tegra_kbc_driver); 815 - } 816 - module_init(tegra_kbc_init); 805 + module_platform_driver(tegra_kbc_driver); 817 806 818 807 MODULE_LICENSE("GPL"); 819 808 MODULE_AUTHOR("Rakesh Iyer <riyer@nvidia.com>");
+1 -13
drivers/input/keyboard/tnetv107x-keypad.c
··· 322 322 .driver.name = "tnetv107x-keypad", 323 323 .driver.owner = THIS_MODULE, 324 324 }; 325 - 326 - static int __init keypad_init(void) 327 - { 328 - return platform_driver_register(&keypad_driver); 329 - } 330 - 331 - static void __exit keypad_exit(void) 332 - { 333 - platform_driver_unregister(&keypad_driver); 334 - } 335 - 336 - module_init(keypad_init); 337 - module_exit(keypad_exit); 325 + module_platform_driver(keypad_driver); 338 326 339 327 MODULE_AUTHOR("Cyril Chemparathy"); 340 328 MODULE_DESCRIPTION("TNETV107X Keypad Driver");
+1 -12
drivers/input/keyboard/twl4030_keypad.c
··· 460 460 .owner = THIS_MODULE, 461 461 }, 462 462 }; 463 - 464 - static int __init twl4030_kp_init(void) 465 - { 466 - return platform_driver_register(&twl4030_kp_driver); 467 - } 468 - module_init(twl4030_kp_init); 469 - 470 - static void __exit twl4030_kp_exit(void) 471 - { 472 - platform_driver_unregister(&twl4030_kp_driver); 473 - } 474 - module_exit(twl4030_kp_exit); 463 + module_platform_driver(twl4030_kp_driver); 475 464 476 465 MODULE_AUTHOR("Texas Instruments"); 477 466 MODULE_DESCRIPTION("TWL4030 Keypad Driver");
+1 -13
drivers/input/keyboard/w90p910_keypad.c
··· 262 262 .owner = THIS_MODULE, 263 263 }, 264 264 }; 265 - 266 - static int __init w90p910_keypad_init(void) 267 - { 268 - return platform_driver_register(&w90p910_keypad_driver); 269 - } 270 - 271 - static void __exit w90p910_keypad_exit(void) 272 - { 273 - platform_driver_unregister(&w90p910_keypad_driver); 274 - } 275 - 276 - module_init(w90p910_keypad_init); 277 - module_exit(w90p910_keypad_exit); 265 + module_platform_driver(w90p910_keypad_driver); 278 266 279 267 MODULE_AUTHOR("Wan ZongShun <mcuos.com@gmail.com>"); 280 268 MODULE_DESCRIPTION("w90p910 keypad driver");