From ca83922e1c51c090e62bd42f3c12c84f49374a9e Mon Sep 17 00:00:00 2001 From: Axel Lin Date: Fri, 16 Mar 2012 23:05:26 -0700 Subject: 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 Signed-off-by: Dmitry Torokhov --- drivers/input/touchscreen/ad7877.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'drivers/input/touchscreen/ad7877.c') diff --git a/drivers/input/touchscreen/ad7877.c b/drivers/input/touchscreen/ad7877.c index 49a36df0b75..2c7692108e6 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 "); MODULE_DESCRIPTION("AD7877 touchscreen Driver"); -- cgit v1.2.3-70-g09d2