diff options
author | Axel Lin <axel.lin@gmail.com> | 2012-03-16 23:05:26 -0700 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2012-03-16 23:06:11 -0700 |
commit | ca83922e1c51c090e62bd42f3c12c84f49374a9e (patch) | |
tree | d0d7b5c307fc445abe41ae614857643b222e1528 /drivers/input/touchscreen | |
parent | 0f1142a514e101076bc01de2f93b242693d0f16f (diff) |
Input: convert SPI drivers to use module_spi_driver()
This patch converts the drivers in drivers/input/* to use the
module_spi_driver() macro which makes the code smaller and a bit
simpler.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input/touchscreen')
-rw-r--r-- | drivers/input/touchscreen/ad7877.c | 12 | ||||
-rw-r--r-- | drivers/input/touchscreen/ad7879-spi.c | 12 | ||||
-rw-r--r-- | drivers/input/touchscreen/ads7846.c | 12 | ||||
-rw-r--r-- | drivers/input/touchscreen/cyttsp_spi.c | 12 | ||||
-rw-r--r-- | drivers/input/touchscreen/tsc2005.c | 12 |
5 files changed, 5 insertions, 55 deletions
diff --git a/drivers/input/touchscreen/ad7877.c b/drivers/input/touchscreen/ad7877.c index 49a36df0b75..2c7692108e6 100644 --- a/drivers/input/touchscreen/ad7877.c +++ b/drivers/input/touchscreen/ad7877.c @@ -860,17 +860,7 @@ static struct spi_driver ad7877_driver = { .remove = __devexit_p(ad7877_remove), }; -static int __init ad7877_init(void) -{ - return spi_register_driver(&ad7877_driver); -} -module_init(ad7877_init); - -static void __exit ad7877_exit(void) -{ - spi_unregister_driver(&ad7877_driver); -} -module_exit(ad7877_exit); +module_spi_driver(ad7877_driver); MODULE_AUTHOR("Michael Hennerich <hennerich@blackfin.uclinux.org>"); MODULE_DESCRIPTION("AD7877 touchscreen Driver"); diff --git a/drivers/input/touchscreen/ad7879-spi.c b/drivers/input/touchscreen/ad7879-spi.c index 9b2e1c2b197..db49abf056b 100644 --- a/drivers/input/touchscreen/ad7879-spi.c +++ b/drivers/input/touchscreen/ad7879-spi.c @@ -157,17 +157,7 @@ static struct spi_driver ad7879_spi_driver = { .remove = __devexit_p(ad7879_spi_remove), }; -static int __init ad7879_spi_init(void) -{ - return spi_register_driver(&ad7879_spi_driver); -} -module_init(ad7879_spi_init); - -static void __exit ad7879_spi_exit(void) -{ - spi_unregister_driver(&ad7879_spi_driver); -} -module_exit(ad7879_spi_exit); +module_spi_driver(ad7879_spi_driver); MODULE_AUTHOR("Michael Hennerich <hennerich@blackfin.uclinux.org>"); MODULE_DESCRIPTION("AD7879(-1) touchscreen SPI bus driver"); diff --git a/drivers/input/touchscreen/ads7846.c b/drivers/input/touchscreen/ads7846.c index 23fd9018565..f02028ec3db 100644 --- a/drivers/input/touchscreen/ads7846.c +++ b/drivers/input/touchscreen/ads7846.c @@ -1433,17 +1433,7 @@ static struct spi_driver ads7846_driver = { .remove = __devexit_p(ads7846_remove), }; -static int __init ads7846_init(void) -{ - return spi_register_driver(&ads7846_driver); -} -module_init(ads7846_init); - -static void __exit ads7846_exit(void) -{ - spi_unregister_driver(&ads7846_driver); -} -module_exit(ads7846_exit); +module_spi_driver(ads7846_driver); MODULE_DESCRIPTION("ADS7846 TouchScreen Driver"); MODULE_LICENSE("GPL"); diff --git a/drivers/input/touchscreen/cyttsp_spi.c b/drivers/input/touchscreen/cyttsp_spi.c index 9db5f8754d1..9f263410407 100644 --- a/drivers/input/touchscreen/cyttsp_spi.c +++ b/drivers/input/touchscreen/cyttsp_spi.c @@ -191,17 +191,7 @@ static struct spi_driver cyttsp_spi_driver = { .remove = __devexit_p(cyttsp_spi_remove), }; -static int __init cyttsp_spi_init(void) -{ - return spi_register_driver(&cyttsp_spi_driver); -} -module_init(cyttsp_spi_init); - -static void __exit cyttsp_spi_exit(void) -{ - spi_unregister_driver(&cyttsp_spi_driver); -} -module_exit(cyttsp_spi_exit); +module_spi_driver(cyttsp_spi_driver); MODULE_ALIAS("spi:cyttsp"); MODULE_LICENSE("GPL"); diff --git a/drivers/input/touchscreen/tsc2005.c b/drivers/input/touchscreen/tsc2005.c index 067d9566299..b6adeaee9cc 100644 --- a/drivers/input/touchscreen/tsc2005.c +++ b/drivers/input/touchscreen/tsc2005.c @@ -747,17 +747,7 @@ static struct spi_driver tsc2005_driver = { .remove = __devexit_p(tsc2005_remove), }; -static int __init tsc2005_init(void) -{ - return spi_register_driver(&tsc2005_driver); -} -module_init(tsc2005_init); - -static void __exit tsc2005_exit(void) -{ - spi_unregister_driver(&tsc2005_driver); -} -module_exit(tsc2005_exit); +module_spi_driver(tsc2005_driver); MODULE_AUTHOR("Lauri Leukkunen <lauri.leukkunen@nokia.com>"); MODULE_DESCRIPTION("TSC2005 Touchscreen Driver"); |