summaryrefslogtreecommitdiff
path: root/drivers/input/touchscreen/ad7877.c
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@gmail.com>2012-03-17 06:05:26 (GMT)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2012-03-17 06:06:11 (GMT)
commitca83922e1c51c090e62bd42f3c12c84f49374a9e (patch)
treed0d7b5c307fc445abe41ae614857643b222e1528 /drivers/input/touchscreen/ad7877.c
parent0f1142a514e101076bc01de2f93b242693d0f16f (diff)
downloadlinux-ca83922e1c51c090e62bd42f3c12c84f49374a9e.tar.xz
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/ad7877.c')
-rw-r--r--drivers/input/touchscreen/ad7877.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/drivers/input/touchscreen/ad7877.c b/drivers/input/touchscreen/ad7877.c
index 49a36df..2c76921 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");