diff options
author | Axel Lin <axel.lin@gmail.com> | 2012-03-17 02:05:26 -0400 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2012-03-17 02:06:11 -0400 |
commit | ca83922e1c51c090e62bd42f3c12c84f49374a9e (patch) | |
tree | d0d7b5c307fc445abe41ae614857643b222e1528 /drivers/input/touchscreen/ads7846.c | |
parent | 0f1142a514e101076bc01de2f93b242693d0f16f (diff) |
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.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/drivers/input/touchscreen/ads7846.c b/drivers/input/touchscreen/ads7846.c index 23fd9018565..f02028ec3db 100644 --- a/drivers/input/touchscreen/ads7846.c +++ b/drivers/input/touchscreen/ads7846.c | |||
@@ -1433,17 +1433,7 @@ static struct spi_driver ads7846_driver = { | |||
1433 | .remove = __devexit_p(ads7846_remove), | 1433 | .remove = __devexit_p(ads7846_remove), |
1434 | }; | 1434 | }; |
1435 | 1435 | ||
1436 | static int __init ads7846_init(void) | 1436 | module_spi_driver(ads7846_driver); |
1437 | { | ||
1438 | return spi_register_driver(&ads7846_driver); | ||
1439 | } | ||
1440 | module_init(ads7846_init); | ||
1441 | |||
1442 | static void __exit ads7846_exit(void) | ||
1443 | { | ||
1444 | spi_unregister_driver(&ads7846_driver); | ||
1445 | } | ||
1446 | module_exit(ads7846_exit); | ||
1447 | 1437 | ||
1448 | MODULE_DESCRIPTION("ADS7846 TouchScreen Driver"); | 1438 | MODULE_DESCRIPTION("ADS7846 TouchScreen Driver"); |
1449 | MODULE_LICENSE("GPL"); | 1439 | MODULE_LICENSE("GPL"); |