aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/touchscreen
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@gmail.com>2012-03-17 02:05:26 -0400
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2012-03-17 02:06:11 -0400
commitca83922e1c51c090e62bd42f3c12c84f49374a9e (patch)
treed0d7b5c307fc445abe41ae614857643b222e1528 /drivers/input/touchscreen
parent0f1142a514e101076bc01de2f93b242693d0f16f (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.c12
-rw-r--r--drivers/input/touchscreen/ad7879-spi.c12
-rw-r--r--drivers/input/touchscreen/ads7846.c12
-rw-r--r--drivers/input/touchscreen/cyttsp_spi.c12
-rw-r--r--drivers/input/touchscreen/tsc2005.c12
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
863static int __init ad7877_init(void) 863module_spi_driver(ad7877_driver);
864{
865 return spi_register_driver(&ad7877_driver);
866}
867module_init(ad7877_init);
868
869static void __exit ad7877_exit(void)
870{
871 spi_unregister_driver(&ad7877_driver);
872}
873module_exit(ad7877_exit);
874 864
875MODULE_AUTHOR("Michael Hennerich <hennerich@blackfin.uclinux.org>"); 865MODULE_AUTHOR("Michael Hennerich <hennerich@blackfin.uclinux.org>");
876MODULE_DESCRIPTION("AD7877 touchscreen Driver"); 866MODULE_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
160static int __init ad7879_spi_init(void) 160module_spi_driver(ad7879_spi_driver);
161{
162 return spi_register_driver(&ad7879_spi_driver);
163}
164module_init(ad7879_spi_init);
165
166static void __exit ad7879_spi_exit(void)
167{
168 spi_unregister_driver(&ad7879_spi_driver);
169}
170module_exit(ad7879_spi_exit);
171 161
172MODULE_AUTHOR("Michael Hennerich <hennerich@blackfin.uclinux.org>"); 162MODULE_AUTHOR("Michael Hennerich <hennerich@blackfin.uclinux.org>");
173MODULE_DESCRIPTION("AD7879(-1) touchscreen SPI bus driver"); 163MODULE_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
1436static int __init ads7846_init(void) 1436module_spi_driver(ads7846_driver);
1437{
1438 return spi_register_driver(&ads7846_driver);
1439}
1440module_init(ads7846_init);
1441
1442static void __exit ads7846_exit(void)
1443{
1444 spi_unregister_driver(&ads7846_driver);
1445}
1446module_exit(ads7846_exit);
1447 1437
1448MODULE_DESCRIPTION("ADS7846 TouchScreen Driver"); 1438MODULE_DESCRIPTION("ADS7846 TouchScreen Driver");
1449MODULE_LICENSE("GPL"); 1439MODULE_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
194static int __init cyttsp_spi_init(void) 194module_spi_driver(cyttsp_spi_driver);
195{
196 return spi_register_driver(&cyttsp_spi_driver);
197}
198module_init(cyttsp_spi_init);
199
200static void __exit cyttsp_spi_exit(void)
201{
202 spi_unregister_driver(&cyttsp_spi_driver);
203}
204module_exit(cyttsp_spi_exit);
205 195
206MODULE_ALIAS("spi:cyttsp"); 196MODULE_ALIAS("spi:cyttsp");
207MODULE_LICENSE("GPL"); 197MODULE_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
750static int __init tsc2005_init(void) 750module_spi_driver(tsc2005_driver);
751{
752 return spi_register_driver(&tsc2005_driver);
753}
754module_init(tsc2005_init);
755
756static void __exit tsc2005_exit(void)
757{
758 spi_unregister_driver(&tsc2005_driver);
759}
760module_exit(tsc2005_exit);
761 751
762MODULE_AUTHOR("Lauri Leukkunen <lauri.leukkunen@nokia.com>"); 752MODULE_AUTHOR("Lauri Leukkunen <lauri.leukkunen@nokia.com>");
763MODULE_DESCRIPTION("TSC2005 Touchscreen Driver"); 753MODULE_DESCRIPTION("TSC2005 Touchscreen Driver");