summaryrefslogtreecommitdiffstats
path: root/drivers/input/misc/adxl34x-spi.c
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@gmail.com>2012-03-17 07:05:26 +0100
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2012-03-17 07:06:11 +0100
commitca83922e1c51c090e62bd42f3c12c84f49374a9e (patch)
treed0d7b5c307fc445abe41ae614857643b222e1528 /drivers/input/misc/adxl34x-spi.c
parentInput: omap4-keypad - move platform_data to <linux/platform_data> (diff)
downloadlinux-ca83922e1c51c090e62bd42f3c12c84f49374a9e.tar.xz
linux-ca83922e1c51c090e62bd42f3c12c84f49374a9e.zip
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/misc/adxl34x-spi.c')
-rw-r--r--drivers/input/misc/adxl34x-spi.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/drivers/input/misc/adxl34x-spi.c b/drivers/input/misc/adxl34x-spi.c
index 34d401efd4a1..820a802a1e6e 100644
--- a/drivers/input/misc/adxl34x-spi.c
+++ b/drivers/input/misc/adxl34x-spi.c
@@ -129,17 +129,7 @@ static struct spi_driver adxl34x_driver = {
.remove = __devexit_p(adxl34x_spi_remove),
};
-static int __init adxl34x_spi_init(void)
-{
- 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_spi_driver(adxl34x_driver);
MODULE_AUTHOR("Michael Hennerich <hennerich@blackfin.uclinux.org>");
MODULE_DESCRIPTION("ADXL345/346 Three-Axis Digital Accelerometer SPI Bus Driver");