]> Pileus Git - ~andy/linux/commitdiff
Input: touchscreen - use macro module_platform_driver()
authorJJ Ding <dgdunix@gmail.com>
Tue, 29 Nov 2011 19:14:13 +0000 (11:14 -0800)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Thu, 1 Dec 2011 07:41:43 +0000 (23:41 -0800)
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>
18 files changed:
drivers/input/touchscreen/88pm860x-ts.c
drivers/input/touchscreen/atmel-wm97xx.c
drivers/input/touchscreen/atmel_tsadcc.c
drivers/input/touchscreen/da9034-ts.c
drivers/input/touchscreen/intel-mid-touch.c
drivers/input/touchscreen/jornada720_ts.c
drivers/input/touchscreen/lpc32xx_ts.c
drivers/input/touchscreen/mainstone-wm97xx.c
drivers/input/touchscreen/mc13783_ts.c
drivers/input/touchscreen/pcap_ts.c
drivers/input/touchscreen/s3c2410_ts.c
drivers/input/touchscreen/stmpe-ts.c
drivers/input/touchscreen/tnetv107x-ts.c
drivers/input/touchscreen/tps6507x-ts.c
drivers/input/touchscreen/ucb1400_ts.c
drivers/input/touchscreen/w90p910_ts.c
drivers/input/touchscreen/wm831x-ts.c
drivers/input/touchscreen/zylonite-wm97xx.c

index b3aebc2166ba666256fd083da1f5c733545530fc..05f30b73c3c385efc2906185877ecee28e30bc9f 100644 (file)
@@ -217,18 +217,7 @@ static struct platform_driver pm860x_touch_driver = {
        .probe  = pm860x_touch_probe,
        .remove = __devexit_p(pm860x_touch_remove),
 };
-
-static int __init pm860x_touch_init(void)
-{
-       return platform_driver_register(&pm860x_touch_driver);
-}
-module_init(pm860x_touch_init);
-
-static void __exit pm860x_touch_exit(void)
-{
-       platform_driver_unregister(&pm860x_touch_driver);
-}
-module_exit(pm860x_touch_exit);
+module_platform_driver(pm860x_touch_driver);
 
 MODULE_DESCRIPTION("Touchscreen driver for Marvell Semiconductor 88PM860x");
 MODULE_AUTHOR("Haojian Zhuang <haojian.zhuang@marvell.com>");
index 8034cbb20f74c8d8bcd426aa27b998e8bd8fcf20..d016cb26d12523f6eb24214aa10a7e1f70a286ee 100644 (file)
@@ -429,18 +429,7 @@ static struct platform_driver atmel_wm97xx_driver = {
        .suspend        = atmel_wm97xx_suspend,
        .resume         = atmel_wm97xx_resume,
 };
-
-static int __init atmel_wm97xx_init(void)
-{
-       return platform_driver_probe(&atmel_wm97xx_driver, atmel_wm97xx_probe);
-}
-module_init(atmel_wm97xx_init);
-
-static void __exit atmel_wm97xx_exit(void)
-{
-       platform_driver_unregister(&atmel_wm97xx_driver);
-}
-module_exit(atmel_wm97xx_exit);
+module_platform_driver(atmel_wm97xx_driver);
 
 MODULE_AUTHOR("Hans-Christian Egtvedt <egtvedt@samfundet.no>");
 MODULE_DESCRIPTION("wm97xx continuous touch driver for Atmel AT91 and AVR32");
index 122a878836598b94320aa2262522a056a86c3620..201b2d2ec1b3bbb63f47d4c4d207c842532f6db2 100644 (file)
@@ -351,20 +351,7 @@ static struct platform_driver atmel_tsadcc_driver = {
                .name   = "atmel_tsadcc",
        },
 };
-
-static int __init atmel_tsadcc_init(void)
-{
-       return platform_driver_register(&atmel_tsadcc_driver);
-}
-
-static void __exit atmel_tsadcc_exit(void)
-{
-       platform_driver_unregister(&atmel_tsadcc_driver);
-}
-
-module_init(atmel_tsadcc_init);
-module_exit(atmel_tsadcc_exit);
-
+module_platform_driver(atmel_tsadcc_driver);
 
 MODULE_LICENSE("GPL");
 MODULE_DESCRIPTION("Atmel TouchScreen Driver");
index 2b72a5923c16a41f9cfbd1400f958f736842fd6f..36b65cf10d7f83b25a34b2148986c3a27b7c4bfc 100644 (file)
@@ -379,18 +379,7 @@ static struct platform_driver da9034_touch_driver = {
        .probe          = da9034_touch_probe,
        .remove         = __devexit_p(da9034_touch_remove),
 };
-
-static int __init da9034_touch_init(void)
-{
-       return platform_driver_register(&da9034_touch_driver);
-}
-module_init(da9034_touch_init);
-
-static void __exit da9034_touch_exit(void)
-{
-       platform_driver_unregister(&da9034_touch_driver);
-}
-module_exit(da9034_touch_exit);
+module_platform_driver(da9034_touch_driver);
 
 MODULE_DESCRIPTION("Touchscreen driver for Dialog Semiconductor DA9034");
 MODULE_AUTHOR("Eric Miao <eric.miao@marvell.com>, Bin Yang <bin.yang@marvell.com>");
index 327695268e06ed2413ddbb8e02e4079ed3eee231..3cd7a837f82b203f41f5ff1aa7cefcf5b3714594 100644 (file)
@@ -664,18 +664,7 @@ static struct platform_driver mrstouch_driver = {
        .probe          = mrstouch_probe,
        .remove         = __devexit_p(mrstouch_remove),
 };
-
-static int __init mrstouch_init(void)
-{
-       return platform_driver_register(&mrstouch_driver);
-}
-module_init(mrstouch_init);
-
-static void __exit mrstouch_exit(void)
-{
-       platform_driver_unregister(&mrstouch_driver);
-}
-module_exit(mrstouch_exit);
+module_platform_driver(mrstouch_driver);
 
 MODULE_AUTHOR("Sreedhara Murthy. D.S, sreedhara.ds@intel.com");
 MODULE_DESCRIPTION("Intel Moorestown Resistive Touch Screen Driver");
index 50076c2d59e23467e2be9bd1da2f00b7d59db2b5..c3848ad2325bcbe48d6a244d374ffd08cc70d8a9 100644 (file)
@@ -172,16 +172,4 @@ static struct platform_driver jornada720_ts_driver = {
                .owner  = THIS_MODULE,
        },
 };
-
-static int __init jornada720_ts_init(void)
-{
-       return platform_driver_register(&jornada720_ts_driver);
-}
-
-static void __exit jornada720_ts_exit(void)
-{
-       platform_driver_unregister(&jornada720_ts_driver);
-}
-
-module_init(jornada720_ts_init);
-module_exit(jornada720_ts_exit);
+module_platform_driver(jornada720_ts_driver);
index 0a484ed5295c282f03dda9cf3f3e1810fb440537..afcd0691ec678a03de9a5f36578284574f05424a 100644 (file)
@@ -392,18 +392,7 @@ static struct platform_driver lpc32xx_ts_driver = {
                .pm     = LPC32XX_TS_PM_OPS,
        },
 };
-
-static int __init lpc32xx_ts_init(void)
-{
-       return platform_driver_register(&lpc32xx_ts_driver);
-}
-module_init(lpc32xx_ts_init);
-
-static void __exit lpc32xx_ts_exit(void)
-{
-       platform_driver_unregister(&lpc32xx_ts_driver);
-}
-module_exit(lpc32xx_ts_exit);
+module_platform_driver(lpc32xx_ts_driver);
 
 MODULE_AUTHOR("Kevin Wells <kevin.wells@nxp.com");
 MODULE_DESCRIPTION("LPC32XX TSC Driver");
index e966c29ff1bb1f81e035eaeb8a5a4144828119aa..7d2b2136e5ad89f1a63a1ffce345f2c227096a71 100644 (file)
@@ -302,19 +302,7 @@ static struct platform_driver mainstone_wm97xx_driver = {
                .name = "wm97xx-touch",
        },
 };
-
-static int __init mainstone_wm97xx_init(void)
-{
-       return platform_driver_register(&mainstone_wm97xx_driver);
-}
-
-static void __exit mainstone_wm97xx_exit(void)
-{
-       platform_driver_unregister(&mainstone_wm97xx_driver);
-}
-
-module_init(mainstone_wm97xx_init);
-module_exit(mainstone_wm97xx_exit);
+module_platform_driver(mainstone_wm97xx_driver);
 
 /* Module information */
 MODULE_AUTHOR("Liam Girdwood <lrg@slimlogic.co.uk>");
index ede02743eac1997b426a7970f96429a486ea4059..68f86f7dabbce712f80ebe3c6322f008bf934ea2 100644 (file)
@@ -240,18 +240,7 @@ static struct platform_driver mc13783_ts_driver = {
                .name   = MC13783_TS_NAME,
        },
 };
-
-static int __init mc13783_ts_init(void)
-{
-       return platform_driver_probe(&mc13783_ts_driver, &mc13783_ts_probe);
-}
-module_init(mc13783_ts_init);
-
-static void __exit mc13783_ts_exit(void)
-{
-       platform_driver_unregister(&mc13783_ts_driver);
-}
-module_exit(mc13783_ts_exit);
+module_platform_driver(mc13783_ts_driver);
 
 MODULE_DESCRIPTION("MC13783 input touchscreen driver");
 MODULE_AUTHOR("Sascha Hauer <s.hauer@pengutronix.de>");
index ea6ef16e59b428e9b7338ce57bde07d51bbb44e0..f57aeb80f7e3ac4f097428c8355fb9ed65999e5e 100644 (file)
@@ -252,19 +252,7 @@ static struct platform_driver pcap_ts_driver = {
                .pm     = PCAP_TS_PM_OPS,
        },
 };
-
-static int __init pcap_ts_init(void)
-{
-       return platform_driver_register(&pcap_ts_driver);
-}
-
-static void __exit pcap_ts_exit(void)
-{
-       platform_driver_unregister(&pcap_ts_driver);
-}
-
-module_init(pcap_ts_init);
-module_exit(pcap_ts_exit);
+module_platform_driver(pcap_ts_driver);
 
 MODULE_DESCRIPTION("Motorola PCAP2 touchscreen driver");
 MODULE_AUTHOR("Daniel Ribeiro / Harald Welte");
index 64ce697a34562b0f129b8859e8d95c7f7d96fd8b..bf1a06400067b10dea6b24fc10b5c303e2459b28 100644 (file)
@@ -432,19 +432,7 @@ static struct platform_driver s3c_ts_driver = {
        .probe          = s3c2410ts_probe,
        .remove         = __devexit_p(s3c2410ts_remove),
 };
-
-static int __init s3c2410ts_init(void)
-{
-       return platform_driver_register(&s3c_ts_driver);
-}
-
-static void __exit s3c2410ts_exit(void)
-{
-       platform_driver_unregister(&s3c_ts_driver);
-}
-
-module_init(s3c2410ts_init);
-module_exit(s3c2410ts_exit);
+module_platform_driver(s3c_ts_driver);
 
 MODULE_AUTHOR("Arnaud Patard <arnaud.patard@rtp-net.org>, "
              "Ben Dooks <ben@simtec.co.uk>, "
index ae88e13c99ff5194f88bb48f0096daf820c9bf47..692b685720ce9e8c238c8f1a08f67204214ab6d0 100644 (file)
@@ -379,20 +379,7 @@ static struct platform_driver stmpe_ts_driver = {
        .probe = stmpe_input_probe,
        .remove = __devexit_p(stmpe_ts_remove),
 };
-
-static int __init stmpe_ts_init(void)
-{
-       return platform_driver_register(&stmpe_ts_driver);
-}
-
-module_init(stmpe_ts_init);
-
-static void __exit stmpe_ts_exit(void)
-{
-       platform_driver_unregister(&stmpe_ts_driver);
-}
-
-module_exit(stmpe_ts_exit);
+module_platform_driver(stmpe_ts_driver);
 
 MODULE_AUTHOR("Luotao Fu <l.fu@pengutronix.de>");
 MODULE_DESCRIPTION("STMPEXXX touchscreen driver");
index 0e8f63e5b36ffbd3ee99e1a751dff2d4400e06e7..7e74880973591bb61daa6e3317a94e43bb8f5415 100644 (file)
@@ -378,19 +378,7 @@ static struct platform_driver tsc_driver = {
        .driver.name    = "tnetv107x-ts",
        .driver.owner   = THIS_MODULE,
 };
-
-static int __init tsc_init(void)
-{
-       return platform_driver_register(&tsc_driver);
-}
-
-static void __exit tsc_exit(void)
-{
-       platform_driver_unregister(&tsc_driver);
-}
-
-module_init(tsc_init);
-module_exit(tsc_exit);
+module_platform_driver(tsc_driver);
 
 MODULE_AUTHOR("Cyril Chemparathy");
 MODULE_DESCRIPTION("TNETV107X Touchscreen Driver");
index 43031492d733a4c51b1888481b93265b2d13e881..6c6f6d8ea9b413d68b97b47c72e6d1e192e70e05 100644 (file)
@@ -371,18 +371,7 @@ static struct platform_driver tps6507x_ts_driver = {
        .probe = tps6507x_ts_probe,
        .remove = __devexit_p(tps6507x_ts_remove),
 };
-
-static int __init tps6507x_ts_init(void)
-{
-       return platform_driver_register(&tps6507x_ts_driver);
-}
-module_init(tps6507x_ts_init);
-
-static void __exit tps6507x_ts_exit(void)
-{
-       platform_driver_unregister(&tps6507x_ts_driver);
-}
-module_exit(tps6507x_ts_exit);
+module_platform_driver(tps6507x_ts_driver);
 
 MODULE_AUTHOR("Todd Fischer <todd.fischer@ridgerun.com>");
 MODULE_DESCRIPTION("TPS6507x - TouchScreen driver");
index 3b5b5df04dd686ec77b20d32c16141ce44bc0865..cf2440f537ac56d148e44b34a4cf9b13b4c7013f 100644 (file)
@@ -456,16 +456,7 @@ static struct platform_driver ucb1400_ts_driver = {
                .name   = "ucb1400_ts",
        },
 };
-
-static int __init ucb1400_ts_init(void)
-{
-       return platform_driver_register(&ucb1400_ts_driver);
-}
-
-static void __exit ucb1400_ts_exit(void)
-{
-       platform_driver_unregister(&ucb1400_ts_driver);
-}
+module_platform_driver(ucb1400_ts_driver);
 
 module_param(adcsync, bool, 0444);
 MODULE_PARM_DESC(adcsync, "Synchronize touch readings with ADCSYNC pin.");
@@ -479,8 +470,5 @@ MODULE_PARM_DESC(ts_delay_pressure,
                "delay between panel setup and pressure read."
                "  Default = 0us.");
 
-module_init(ucb1400_ts_init);
-module_exit(ucb1400_ts_exit);
-
 MODULE_DESCRIPTION("Philips UCB1400 touchscreen driver");
 MODULE_LICENSE("GPL");
index 217aa51135c59bda6a9e50498749030c3a593303..9396b21d0e8f953a45e5ac852ec65bbdb590854b 100644 (file)
@@ -331,19 +331,7 @@ static struct platform_driver w90x900ts_driver = {
                .owner  = THIS_MODULE,
        },
 };
-
-static int __init w90x900ts_init(void)
-{
-       return platform_driver_register(&w90x900ts_driver);
-}
-
-static void __exit w90x900ts_exit(void)
-{
-       platform_driver_unregister(&w90x900ts_driver);
-}
-
-module_init(w90x900ts_init);
-module_exit(w90x900ts_exit);
+module_platform_driver(w90x900ts_driver);
 
 MODULE_AUTHOR("Wan ZongShun <mcuos.com@gmail.com>");
 MODULE_DESCRIPTION("w90p910 touch screen driver!");
index 9175d49d25469d0eaa7794960580c14d7740b9a9..4bc851a9dc3d6cf821f1c8ec05f7abf37fb4c781 100644 (file)
@@ -401,18 +401,7 @@ static struct platform_driver wm831x_ts_driver = {
        .probe = wm831x_ts_probe,
        .remove = __devexit_p(wm831x_ts_remove),
 };
-
-static int __init wm831x_ts_init(void)
-{
-       return platform_driver_register(&wm831x_ts_driver);
-}
-module_init(wm831x_ts_init);
-
-static void __exit wm831x_ts_exit(void)
-{
-       platform_driver_unregister(&wm831x_ts_driver);
-}
-module_exit(wm831x_ts_exit);
+module_platform_driver(wm831x_ts_driver);
 
 /* Module information */
 MODULE_AUTHOR("Mark Brown <broonie@opensource.wolfsonmicro.com>");
index f6328c0cded625f10eb7ef0b1418a331fb5df175..add6e3b2802fb5f15ba4123f01b046cc3a3491ed 100644 (file)
@@ -223,19 +223,7 @@ static struct platform_driver zylonite_wm97xx_driver = {
                .name   = "wm97xx-touch",
        },
 };
-
-static int __init zylonite_wm97xx_init(void)
-{
-       return platform_driver_register(&zylonite_wm97xx_driver);
-}
-
-static void __exit zylonite_wm97xx_exit(void)
-{
-       platform_driver_unregister(&zylonite_wm97xx_driver);
-}
-
-module_init(zylonite_wm97xx_init);
-module_exit(zylonite_wm97xx_exit);
+module_platform_driver(zylonite_wm97xx_driver);
 
 /* Module information */
 MODULE_AUTHOR("Mark Brown <broonie@opensource.wolfsonmicro.com>");