summaryrefslogtreecommitdiffstats
path: root/drivers/input/touchscreen/ads7846.c
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@gmail.com>2012-03-16 23:05:26 -0700
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2012-03-16 23:06:11 -0700
commitca83922e1c51c090e62bd42f3c12c84f49374a9e (patch)
treed0d7b5c307fc445abe41ae614857643b222e1528 /drivers/input/touchscreen/ads7846.c
parent0f1142a514e101076bc01de2f93b242693d0f16f (diff)
downloadop-kernel-dev-ca83922e1c51c090e62bd42f3c12c84f49374a9e.zip
op-kernel-dev-ca83922e1c51c090e62bd42f3c12c84f49374a9e.tar.gz
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/ads7846.c')
-rw-r--r--drivers/input/touchscreen/ads7846.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/drivers/input/touchscreen/ads7846.c b/drivers/input/touchscreen/ads7846.c
index 23fd901..f02028e 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");
OpenPOWER on IntegriCloud