From 91efffe26a809bc6660b91e21264f48e501bfb46 Mon Sep 17 00:00:00 2001 From: Axel Lin Date: Fri, 20 Jan 2012 15:53:47 +0800 Subject: hwmon: convert drivers/hwmon/* to use module_spi_driver() This patch converts the drivers in drivers/hwmon/* to use the module_spi_driver() macro which makes the code smaller and a bit simpler. Signed-off-by: Axel Lin Cc: Sonic Zhang Cc: Marc Pignat Cc: Paul Thomas Cc: Eric Miao Acked-by: Sonic Zhang Signed-off-by: Guenter Roeck --- drivers/hwmon/ads7871.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) (limited to 'drivers/hwmon/ads7871.c') diff --git a/drivers/hwmon/ads7871.c b/drivers/hwmon/ads7871.c index 04450f8bf5d..11a5f5f6907 100644 --- a/drivers/hwmon/ads7871.c +++ b/drivers/hwmon/ads7871.c @@ -234,18 +234,7 @@ static struct spi_driver ads7871_driver = { .remove = __devexit_p(ads7871_remove), }; -static int __init ads7871_init(void) -{ - return spi_register_driver(&ads7871_driver); -} - -static void __exit ads7871_exit(void) -{ - spi_unregister_driver(&ads7871_driver); -} - -module_init(ads7871_init); -module_exit(ads7871_exit); +module_spi_driver(ads7871_driver); MODULE_AUTHOR("Paul Thomas "); MODULE_DESCRIPTION("TI ADS7871 A/D driver"); -- cgit v1.2.3-70-g09d2