Commit ca83922e authored by Axel Lin's avatar Axel Lin Committed by Dmitry Torokhov

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: default avatarAxel Lin <axel.lin@gmail.com>
Signed-off-by: default avatarDmitry Torokhov <dtor@mail.ru>
parent 0f1142a5
...@@ -123,17 +123,7 @@ static struct spi_driver ad714x_spi_driver = { ...@@ -123,17 +123,7 @@ static struct spi_driver ad714x_spi_driver = {
.remove = __devexit_p(ad714x_spi_remove), .remove = __devexit_p(ad714x_spi_remove),
}; };
static __init int ad714x_spi_init(void) module_spi_driver(ad714x_spi_driver);
{
return spi_register_driver(&ad714x_spi_driver);
}
module_init(ad714x_spi_init);
static __exit void ad714x_spi_exit(void)
{
spi_unregister_driver(&ad714x_spi_driver);
}
module_exit(ad714x_spi_exit);
MODULE_DESCRIPTION("Analog Devices AD714X Capacitance Touch Sensor SPI Bus Driver"); MODULE_DESCRIPTION("Analog Devices AD714X Capacitance Touch Sensor SPI Bus Driver");
MODULE_AUTHOR("Barry Song <21cnbao@gmail.com>"); MODULE_AUTHOR("Barry Song <21cnbao@gmail.com>");
......
...@@ -129,17 +129,7 @@ static struct spi_driver adxl34x_driver = { ...@@ -129,17 +129,7 @@ static struct spi_driver adxl34x_driver = {
.remove = __devexit_p(adxl34x_spi_remove), .remove = __devexit_p(adxl34x_spi_remove),
}; };
static int __init adxl34x_spi_init(void) module_spi_driver(adxl34x_driver);
{
return spi_register_driver(&adxl34x_driver);
}
module_init(adxl34x_spi_init);
static void __exit adxl34x_spi_exit(void)
{
spi_unregister_driver(&adxl34x_driver);
}
module_exit(adxl34x_spi_exit);
MODULE_AUTHOR("Michael Hennerich <hennerich@blackfin.uclinux.org>"); MODULE_AUTHOR("Michael Hennerich <hennerich@blackfin.uclinux.org>");
MODULE_DESCRIPTION("ADXL345/346 Three-Axis Digital Accelerometer SPI Bus Driver"); MODULE_DESCRIPTION("ADXL345/346 Three-Axis Digital Accelerometer SPI Bus Driver");
......
...@@ -860,17 +860,7 @@ static struct spi_driver ad7877_driver = { ...@@ -860,17 +860,7 @@ static struct spi_driver ad7877_driver = {
.remove = __devexit_p(ad7877_remove), .remove = __devexit_p(ad7877_remove),
}; };
static int __init ad7877_init(void) module_spi_driver(ad7877_driver);
{
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_AUTHOR("Michael Hennerich <hennerich@blackfin.uclinux.org>"); MODULE_AUTHOR("Michael Hennerich <hennerich@blackfin.uclinux.org>");
MODULE_DESCRIPTION("AD7877 touchscreen Driver"); MODULE_DESCRIPTION("AD7877 touchscreen Driver");
......
...@@ -157,17 +157,7 @@ static struct spi_driver ad7879_spi_driver = { ...@@ -157,17 +157,7 @@ static struct spi_driver ad7879_spi_driver = {
.remove = __devexit_p(ad7879_spi_remove), .remove = __devexit_p(ad7879_spi_remove),
}; };
static int __init ad7879_spi_init(void) module_spi_driver(ad7879_spi_driver);
{
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_AUTHOR("Michael Hennerich <hennerich@blackfin.uclinux.org>"); MODULE_AUTHOR("Michael Hennerich <hennerich@blackfin.uclinux.org>");
MODULE_DESCRIPTION("AD7879(-1) touchscreen SPI bus driver"); MODULE_DESCRIPTION("AD7879(-1) touchscreen SPI bus driver");
......
...@@ -1433,17 +1433,7 @@ static struct spi_driver ads7846_driver = { ...@@ -1433,17 +1433,7 @@ static struct spi_driver ads7846_driver = {
.remove = __devexit_p(ads7846_remove), .remove = __devexit_p(ads7846_remove),
}; };
static int __init ads7846_init(void) module_spi_driver(ads7846_driver);
{
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_DESCRIPTION("ADS7846 TouchScreen Driver"); MODULE_DESCRIPTION("ADS7846 TouchScreen Driver");
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
......
...@@ -191,17 +191,7 @@ static struct spi_driver cyttsp_spi_driver = { ...@@ -191,17 +191,7 @@ static struct spi_driver cyttsp_spi_driver = {
.remove = __devexit_p(cyttsp_spi_remove), .remove = __devexit_p(cyttsp_spi_remove),
}; };
static int __init cyttsp_spi_init(void) module_spi_driver(cyttsp_spi_driver);
{
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_ALIAS("spi:cyttsp"); MODULE_ALIAS("spi:cyttsp");
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
......
...@@ -747,17 +747,7 @@ static struct spi_driver tsc2005_driver = { ...@@ -747,17 +747,7 @@ static struct spi_driver tsc2005_driver = {
.remove = __devexit_p(tsc2005_remove), .remove = __devexit_p(tsc2005_remove),
}; };
static int __init tsc2005_init(void) module_spi_driver(tsc2005_driver);
{
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_AUTHOR("Lauri Leukkunen <lauri.leukkunen@nokia.com>"); MODULE_AUTHOR("Lauri Leukkunen <lauri.leukkunen@nokia.com>");
MODULE_DESCRIPTION("TSC2005 Touchscreen Driver"); MODULE_DESCRIPTION("TSC2005 Touchscreen Driver");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment