diff options
author | Axel Lin <axel.lin@gmail.com> | 2012-03-17 02:05:26 -0400 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2012-03-17 02:06:11 -0400 |
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 49a36df0b752..2c7692108e6c 100644 --- a/drivers/input/touchscreen/ad7877.c +++ b/drivers/input/touchscreen/ad7877.c | |||
@@ -860,17 +860,7 @@ static struct spi_driver ad7877_driver = { | |||
860 | .remove = __devexit_p(ad7877_remove), | 860 | .remove = __devexit_p(ad7877_remove), |
861 | }; | 861 | }; |
862 | 862 | ||
863 | static int __init ad7877_init(void) | 863 | module_spi_driver(ad7877_driver); |
864 | { | ||
865 | return spi_register_driver(&ad7877_driver); | ||
866 | } | ||
867 | module_init(ad7877_init); | ||
868 | |||
869 | static void __exit ad7877_exit(void) | ||
870 | { | ||
871 | spi_unregister_driver(&ad7877_driver); | ||
872 | } | ||
873 | module_exit(ad7877_exit); | ||
874 | 864 | ||
875 | MODULE_AUTHOR("Michael Hennerich <hennerich@blackfin.uclinux.org>"); | 865 | MODULE_AUTHOR("Michael Hennerich <hennerich@blackfin.uclinux.org>"); |
876 | MODULE_DESCRIPTION("AD7877 touchscreen Driver"); | 866 | MODULE_DESCRIPTION("AD7877 touchscreen Driver"); |
diff --git a/drivers/input/touchscreen/ad7879-spi.c b/drivers/input/touchscreen/ad7879-spi.c index 9b2e1c2b1971..db49abf056ba 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 = { | |||
157 | .remove = __devexit_p(ad7879_spi_remove), | 157 | .remove = __devexit_p(ad7879_spi_remove), |
158 | }; | 158 | }; |
159 | 159 | ||
160 | static int __init ad7879_spi_init(void) | 160 | module_spi_driver(ad7879_spi_driver); |
161 | { | ||
162 | return spi_register_driver(&ad7879_spi_driver); | ||
163 | } | ||
164 | module_init(ad7879_spi_init); | ||
165 | |||
166 | static void __exit ad7879_spi_exit(void) | ||
167 | { | ||
168 | spi_unregister_driver(&ad7879_spi_driver); | ||
169 | } | ||
170 | module_exit(ad7879_spi_exit); | ||
171 | 161 | ||
172 | MODULE_AUTHOR("Michael Hennerich <hennerich@blackfin.uclinux.org>"); | 162 | MODULE_AUTHOR("Michael Hennerich <hennerich@blackfin.uclinux.org>"); |
173 | MODULE_DESCRIPTION("AD7879(-1) touchscreen SPI bus driver"); | 163 | MODULE_DESCRIPTION("AD7879(-1) touchscreen SPI bus driver"); |
diff --git a/drivers/input/touchscreen/ads7846.c b/drivers/input/touchscreen/ads7846.c index 23fd90185659..f02028ec3db6 100644 --- a/drivers/input/touchscreen/ads7846.c +++ b/drivers/input/touchscreen/ads7846.c | |||
@@ -1433,17 +1433,7 @@ static struct spi_driver ads7846_driver = { | |||
1433 | .remove = __devexit_p(ads7846_remove), | 1433 | .remove = __devexit_p(ads7846_remove), |
1434 | }; | 1434 | }; |
1435 | 1435 | ||
1436 | static int __init ads7846_init(void) | 1436 | module_spi_driver(ads7846_driver); |
1437 | { | ||
1438 | return spi_register_driver(&ads7846_driver); | ||
1439 | } | ||
1440 | module_init(ads7846_init); | ||
1441 | |||
1442 | static void __exit ads7846_exit(void) | ||
1443 | { | ||
1444 | spi_unregister_driver(&ads7846_driver); | ||
1445 | } | ||
1446 | module_exit(ads7846_exit); | ||
1447 | 1437 | ||
1448 | MODULE_DESCRIPTION("ADS7846 TouchScreen Driver"); | 1438 | MODULE_DESCRIPTION("ADS7846 TouchScreen Driver"); |
1449 | MODULE_LICENSE("GPL"); | 1439 | MODULE_LICENSE("GPL"); |
diff --git a/drivers/input/touchscreen/cyttsp_spi.c b/drivers/input/touchscreen/cyttsp_spi.c index 9db5f8754d10..9f263410407b 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 = { | |||
191 | .remove = __devexit_p(cyttsp_spi_remove), | 191 | .remove = __devexit_p(cyttsp_spi_remove), |
192 | }; | 192 | }; |
193 | 193 | ||
194 | static int __init cyttsp_spi_init(void) | 194 | module_spi_driver(cyttsp_spi_driver); |
195 | { | ||
196 | return spi_register_driver(&cyttsp_spi_driver); | ||
197 | } | ||
198 | module_init(cyttsp_spi_init); | ||
199 | |||
200 | static void __exit cyttsp_spi_exit(void) | ||
201 | { | ||
202 | spi_unregister_driver(&cyttsp_spi_driver); | ||
203 | } | ||
204 | module_exit(cyttsp_spi_exit); | ||
205 | 195 | ||
206 | MODULE_ALIAS("spi:cyttsp"); | 196 | MODULE_ALIAS("spi:cyttsp"); |
207 | MODULE_LICENSE("GPL"); | 197 | MODULE_LICENSE("GPL"); |
diff --git a/drivers/input/touchscreen/tsc2005.c b/drivers/input/touchscreen/tsc2005.c index 067d95662997..b6adeaee9cc5 100644 --- a/drivers/input/touchscreen/tsc2005.c +++ b/drivers/input/touchscreen/tsc2005.c | |||
@@ -747,17 +747,7 @@ static struct spi_driver tsc2005_driver = { | |||
747 | .remove = __devexit_p(tsc2005_remove), | 747 | .remove = __devexit_p(tsc2005_remove), |
748 | }; | 748 | }; |
749 | 749 | ||
750 | static int __init tsc2005_init(void) | 750 | module_spi_driver(tsc2005_driver); |
751 | { | ||
752 | return spi_register_driver(&tsc2005_driver); | ||
753 | } | ||
754 | module_init(tsc2005_init); | ||
755 | |||
756 | static void __exit tsc2005_exit(void) | ||
757 | { | ||
758 | spi_unregister_driver(&tsc2005_driver); | ||
759 | } | ||
760 | module_exit(tsc2005_exit); | ||
761 | 751 | ||
762 | MODULE_AUTHOR("Lauri Leukkunen <lauri.leukkunen@nokia.com>"); | 752 | MODULE_AUTHOR("Lauri Leukkunen <lauri.leukkunen@nokia.com>"); |
763 | MODULE_DESCRIPTION("TSC2005 Touchscreen Driver"); | 753 | MODULE_DESCRIPTION("TSC2005 Touchscreen Driver"); |