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/ad7314.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'drivers/hwmon/ad7314.c') diff --git a/drivers/hwmon/ad7314.c b/drivers/hwmon/ad7314.c index 5d760f3d21c2..0e0cfcc36f8d 100644 --- a/drivers/hwmon/ad7314.c +++ b/drivers/hwmon/ad7314.c @@ -167,17 +167,7 @@ static struct spi_driver ad7314_driver = { .id_table = ad7314_id, }; -static __init int ad7314_init(void) -{ - return spi_register_driver(&ad7314_driver); -} -module_init(ad7314_init); - -static __exit void ad7314_exit(void) -{ - spi_unregister_driver(&ad7314_driver); -} -module_exit(ad7314_exit); +module_spi_driver(ad7314_driver); MODULE_AUTHOR("Sonic Zhang "); MODULE_DESCRIPTION("Analog Devices AD7314, ADT7301 and ADT7302 digital" -- cgit v1.2.3