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

Input: touchscreen - 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
cdcc96e2 24d2469a

+18 -228
+1 -12
drivers/input/touchscreen/88pm860x-ts.c
··· 217 217 .probe = pm860x_touch_probe, 218 218 .remove = __devexit_p(pm860x_touch_remove), 219 219 }; 220 - 221 - static int __init pm860x_touch_init(void) 222 - { 223 - return platform_driver_register(&pm860x_touch_driver); 224 - } 225 - module_init(pm860x_touch_init); 226 - 227 - static void __exit pm860x_touch_exit(void) 228 - { 229 - platform_driver_unregister(&pm860x_touch_driver); 230 - } 231 - module_exit(pm860x_touch_exit); 220 + module_platform_driver(pm860x_touch_driver); 232 221 233 222 MODULE_DESCRIPTION("Touchscreen driver for Marvell Semiconductor 88PM860x"); 234 223 MODULE_AUTHOR("Haojian Zhuang <haojian.zhuang@marvell.com>");
+1 -12
drivers/input/touchscreen/atmel-wm97xx.c
··· 429 429 .suspend = atmel_wm97xx_suspend, 430 430 .resume = atmel_wm97xx_resume, 431 431 }; 432 - 433 - static int __init atmel_wm97xx_init(void) 434 - { 435 - return platform_driver_probe(&atmel_wm97xx_driver, atmel_wm97xx_probe); 436 - } 437 - module_init(atmel_wm97xx_init); 438 - 439 - static void __exit atmel_wm97xx_exit(void) 440 - { 441 - platform_driver_unregister(&atmel_wm97xx_driver); 442 - } 443 - module_exit(atmel_wm97xx_exit); 432 + module_platform_driver(atmel_wm97xx_driver); 444 433 445 434 MODULE_AUTHOR("Hans-Christian Egtvedt <egtvedt@samfundet.no>"); 446 435 MODULE_DESCRIPTION("wm97xx continuous touch driver for Atmel AT91 and AVR32");
+1 -14
drivers/input/touchscreen/atmel_tsadcc.c
··· 351 351 .name = "atmel_tsadcc", 352 352 }, 353 353 }; 354 - 355 - static int __init atmel_tsadcc_init(void) 356 - { 357 - return platform_driver_register(&atmel_tsadcc_driver); 358 - } 359 - 360 - static void __exit atmel_tsadcc_exit(void) 361 - { 362 - platform_driver_unregister(&atmel_tsadcc_driver); 363 - } 364 - 365 - module_init(atmel_tsadcc_init); 366 - module_exit(atmel_tsadcc_exit); 367 - 354 + module_platform_driver(atmel_tsadcc_driver); 368 355 369 356 MODULE_LICENSE("GPL"); 370 357 MODULE_DESCRIPTION("Atmel TouchScreen Driver");
+1 -12
drivers/input/touchscreen/da9034-ts.c
··· 379 379 .probe = da9034_touch_probe, 380 380 .remove = __devexit_p(da9034_touch_remove), 381 381 }; 382 - 383 - static int __init da9034_touch_init(void) 384 - { 385 - return platform_driver_register(&da9034_touch_driver); 386 - } 387 - module_init(da9034_touch_init); 388 - 389 - static void __exit da9034_touch_exit(void) 390 - { 391 - platform_driver_unregister(&da9034_touch_driver); 392 - } 393 - module_exit(da9034_touch_exit); 382 + module_platform_driver(da9034_touch_driver); 394 383 395 384 MODULE_DESCRIPTION("Touchscreen driver for Dialog Semiconductor DA9034"); 396 385 MODULE_AUTHOR("Eric Miao <eric.miao@marvell.com>, Bin Yang <bin.yang@marvell.com>");
+1 -12
drivers/input/touchscreen/intel-mid-touch.c
··· 664 664 .probe = mrstouch_probe, 665 665 .remove = __devexit_p(mrstouch_remove), 666 666 }; 667 - 668 - static int __init mrstouch_init(void) 669 - { 670 - return platform_driver_register(&mrstouch_driver); 671 - } 672 - module_init(mrstouch_init); 673 - 674 - static void __exit mrstouch_exit(void) 675 - { 676 - platform_driver_unregister(&mrstouch_driver); 677 - } 678 - module_exit(mrstouch_exit); 667 + module_platform_driver(mrstouch_driver); 679 668 680 669 MODULE_AUTHOR("Sreedhara Murthy. D.S, sreedhara.ds@intel.com"); 681 670 MODULE_DESCRIPTION("Intel Moorestown Resistive Touch Screen Driver");
+1 -13
drivers/input/touchscreen/jornada720_ts.c
··· 172 172 .owner = THIS_MODULE, 173 173 }, 174 174 }; 175 - 176 - static int __init jornada720_ts_init(void) 177 - { 178 - return platform_driver_register(&jornada720_ts_driver); 179 - } 180 - 181 - static void __exit jornada720_ts_exit(void) 182 - { 183 - platform_driver_unregister(&jornada720_ts_driver); 184 - } 185 - 186 - module_init(jornada720_ts_init); 187 - module_exit(jornada720_ts_exit); 175 + module_platform_driver(jornada720_ts_driver);
+1 -12
drivers/input/touchscreen/lpc32xx_ts.c
··· 392 392 .pm = LPC32XX_TS_PM_OPS, 393 393 }, 394 394 }; 395 - 396 - static int __init lpc32xx_ts_init(void) 397 - { 398 - return platform_driver_register(&lpc32xx_ts_driver); 399 - } 400 - module_init(lpc32xx_ts_init); 401 - 402 - static void __exit lpc32xx_ts_exit(void) 403 - { 404 - platform_driver_unregister(&lpc32xx_ts_driver); 405 - } 406 - module_exit(lpc32xx_ts_exit); 395 + module_platform_driver(lpc32xx_ts_driver); 407 396 408 397 MODULE_AUTHOR("Kevin Wells <kevin.wells@nxp.com"); 409 398 MODULE_DESCRIPTION("LPC32XX TSC Driver");
+1 -13
drivers/input/touchscreen/mainstone-wm97xx.c
··· 302 302 .name = "wm97xx-touch", 303 303 }, 304 304 }; 305 - 306 - static int __init mainstone_wm97xx_init(void) 307 - { 308 - return platform_driver_register(&mainstone_wm97xx_driver); 309 - } 310 - 311 - static void __exit mainstone_wm97xx_exit(void) 312 - { 313 - platform_driver_unregister(&mainstone_wm97xx_driver); 314 - } 315 - 316 - module_init(mainstone_wm97xx_init); 317 - module_exit(mainstone_wm97xx_exit); 305 + module_platform_driver(mainstone_wm97xx_driver); 318 306 319 307 /* Module information */ 320 308 MODULE_AUTHOR("Liam Girdwood <lrg@slimlogic.co.uk>");
+1 -12
drivers/input/touchscreen/mc13783_ts.c
··· 240 240 .name = MC13783_TS_NAME, 241 241 }, 242 242 }; 243 - 244 - static int __init mc13783_ts_init(void) 245 - { 246 - return platform_driver_probe(&mc13783_ts_driver, &mc13783_ts_probe); 247 - } 248 - module_init(mc13783_ts_init); 249 - 250 - static void __exit mc13783_ts_exit(void) 251 - { 252 - platform_driver_unregister(&mc13783_ts_driver); 253 - } 254 - module_exit(mc13783_ts_exit); 243 + module_platform_driver(mc13783_ts_driver); 255 244 256 245 MODULE_DESCRIPTION("MC13783 input touchscreen driver"); 257 246 MODULE_AUTHOR("Sascha Hauer <s.hauer@pengutronix.de>");
+1 -13
drivers/input/touchscreen/pcap_ts.c
··· 252 252 .pm = PCAP_TS_PM_OPS, 253 253 }, 254 254 }; 255 - 256 - static int __init pcap_ts_init(void) 257 - { 258 - return platform_driver_register(&pcap_ts_driver); 259 - } 260 - 261 - static void __exit pcap_ts_exit(void) 262 - { 263 - platform_driver_unregister(&pcap_ts_driver); 264 - } 265 - 266 - module_init(pcap_ts_init); 267 - module_exit(pcap_ts_exit); 255 + module_platform_driver(pcap_ts_driver); 268 256 269 257 MODULE_DESCRIPTION("Motorola PCAP2 touchscreen driver"); 270 258 MODULE_AUTHOR("Daniel Ribeiro / Harald Welte");
+1 -13
drivers/input/touchscreen/s3c2410_ts.c
··· 432 432 .probe = s3c2410ts_probe, 433 433 .remove = __devexit_p(s3c2410ts_remove), 434 434 }; 435 - 436 - static int __init s3c2410ts_init(void) 437 - { 438 - return platform_driver_register(&s3c_ts_driver); 439 - } 440 - 441 - static void __exit s3c2410ts_exit(void) 442 - { 443 - platform_driver_unregister(&s3c_ts_driver); 444 - } 445 - 446 - module_init(s3c2410ts_init); 447 - module_exit(s3c2410ts_exit); 435 + module_platform_driver(s3c_ts_driver); 448 436 449 437 MODULE_AUTHOR("Arnaud Patard <arnaud.patard@rtp-net.org>, " 450 438 "Ben Dooks <ben@simtec.co.uk>, "
+1 -14
drivers/input/touchscreen/stmpe-ts.c
··· 379 379 .probe = stmpe_input_probe, 380 380 .remove = __devexit_p(stmpe_ts_remove), 381 381 }; 382 - 383 - static int __init stmpe_ts_init(void) 384 - { 385 - return platform_driver_register(&stmpe_ts_driver); 386 - } 387 - 388 - module_init(stmpe_ts_init); 389 - 390 - static void __exit stmpe_ts_exit(void) 391 - { 392 - platform_driver_unregister(&stmpe_ts_driver); 393 - } 394 - 395 - module_exit(stmpe_ts_exit); 382 + module_platform_driver(stmpe_ts_driver); 396 383 397 384 MODULE_AUTHOR("Luotao Fu <l.fu@pengutronix.de>"); 398 385 MODULE_DESCRIPTION("STMPEXXX touchscreen driver");
+1 -13
drivers/input/touchscreen/tnetv107x-ts.c
··· 378 378 .driver.name = "tnetv107x-ts", 379 379 .driver.owner = THIS_MODULE, 380 380 }; 381 - 382 - static int __init tsc_init(void) 383 - { 384 - return platform_driver_register(&tsc_driver); 385 - } 386 - 387 - static void __exit tsc_exit(void) 388 - { 389 - platform_driver_unregister(&tsc_driver); 390 - } 391 - 392 - module_init(tsc_init); 393 - module_exit(tsc_exit); 381 + module_platform_driver(tsc_driver); 394 382 395 383 MODULE_AUTHOR("Cyril Chemparathy"); 396 384 MODULE_DESCRIPTION("TNETV107X Touchscreen Driver");
+1 -12
drivers/input/touchscreen/tps6507x-ts.c
··· 371 371 .probe = tps6507x_ts_probe, 372 372 .remove = __devexit_p(tps6507x_ts_remove), 373 373 }; 374 - 375 - static int __init tps6507x_ts_init(void) 376 - { 377 - return platform_driver_register(&tps6507x_ts_driver); 378 - } 379 - module_init(tps6507x_ts_init); 380 - 381 - static void __exit tps6507x_ts_exit(void) 382 - { 383 - platform_driver_unregister(&tps6507x_ts_driver); 384 - } 385 - module_exit(tps6507x_ts_exit); 374 + module_platform_driver(tps6507x_ts_driver); 386 375 387 376 MODULE_AUTHOR("Todd Fischer <todd.fischer@ridgerun.com>"); 388 377 MODULE_DESCRIPTION("TPS6507x - TouchScreen driver");
+1 -13
drivers/input/touchscreen/ucb1400_ts.c
··· 456 456 .name = "ucb1400_ts", 457 457 }, 458 458 }; 459 - 460 - static int __init ucb1400_ts_init(void) 461 - { 462 - return platform_driver_register(&ucb1400_ts_driver); 463 - } 464 - 465 - static void __exit ucb1400_ts_exit(void) 466 - { 467 - platform_driver_unregister(&ucb1400_ts_driver); 468 - } 459 + module_platform_driver(ucb1400_ts_driver); 469 460 470 461 module_param(adcsync, bool, 0444); 471 462 MODULE_PARM_DESC(adcsync, "Synchronize touch readings with ADCSYNC pin."); ··· 469 478 MODULE_PARM_DESC(ts_delay_pressure, 470 479 "delay between panel setup and pressure read." 471 480 " Default = 0us."); 472 - 473 - module_init(ucb1400_ts_init); 474 - module_exit(ucb1400_ts_exit); 475 481 476 482 MODULE_DESCRIPTION("Philips UCB1400 touchscreen driver"); 477 483 MODULE_LICENSE("GPL");
+1 -13
drivers/input/touchscreen/w90p910_ts.c
··· 331 331 .owner = THIS_MODULE, 332 332 }, 333 333 }; 334 - 335 - static int __init w90x900ts_init(void) 336 - { 337 - return platform_driver_register(&w90x900ts_driver); 338 - } 339 - 340 - static void __exit w90x900ts_exit(void) 341 - { 342 - platform_driver_unregister(&w90x900ts_driver); 343 - } 344 - 345 - module_init(w90x900ts_init); 346 - module_exit(w90x900ts_exit); 334 + module_platform_driver(w90x900ts_driver); 347 335 348 336 MODULE_AUTHOR("Wan ZongShun <mcuos.com@gmail.com>"); 349 337 MODULE_DESCRIPTION("w90p910 touch screen driver!");
+1 -12
drivers/input/touchscreen/wm831x-ts.c
··· 401 401 .probe = wm831x_ts_probe, 402 402 .remove = __devexit_p(wm831x_ts_remove), 403 403 }; 404 - 405 - static int __init wm831x_ts_init(void) 406 - { 407 - return platform_driver_register(&wm831x_ts_driver); 408 - } 409 - module_init(wm831x_ts_init); 410 - 411 - static void __exit wm831x_ts_exit(void) 412 - { 413 - platform_driver_unregister(&wm831x_ts_driver); 414 - } 415 - module_exit(wm831x_ts_exit); 404 + module_platform_driver(wm831x_ts_driver); 416 405 417 406 /* Module information */ 418 407 MODULE_AUTHOR("Mark Brown <broonie@opensource.wolfsonmicro.com>");
+1 -13
drivers/input/touchscreen/zylonite-wm97xx.c
··· 223 223 .name = "wm97xx-touch", 224 224 }, 225 225 }; 226 - 227 - static int __init zylonite_wm97xx_init(void) 228 - { 229 - return platform_driver_register(&zylonite_wm97xx_driver); 230 - } 231 - 232 - static void __exit zylonite_wm97xx_exit(void) 233 - { 234 - platform_driver_unregister(&zylonite_wm97xx_driver); 235 - } 236 - 237 - module_init(zylonite_wm97xx_init); 238 - module_exit(zylonite_wm97xx_exit); 226 + module_platform_driver(zylonite_wm97xx_driver); 239 227 240 228 /* Module information */ 241 229 MODULE_AUTHOR("Mark Brown <broonie@opensource.wolfsonmicro.com>");