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/cyttsp_spi.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'drivers/input/touchscreen/cyttsp_spi.c') diff --git a/drivers/input/touchscreen/cyttsp_spi.c b/drivers/input/touchscreen/cyttsp_spi.c index 9db5f8754d10..9f263410407b 100644 --- a/drivers/input/touchscreen/cyttsp_spi.c +++ b/drivers/input/touchscreen/cyttsp_spi.c @@ -191,17 +191,7 @@ static struct spi_driver cyttsp_spi_driver = { .remove = __devexit_p(cyttsp_spi_remove), }; -static int __init cyttsp_spi_init(void) -{ - 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_spi_driver(cyttsp_spi_driver); MODULE_ALIAS("spi:cyttsp"); MODULE_LICENSE("GPL"); -- cgit v1.2.3