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/max1111.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'drivers/hwmon/max1111.c') diff --git a/drivers/hwmon/max1111.c b/drivers/hwmon/max1111.c index 482ca901db30..e5206ae00d76 100644 --- a/drivers/hwmon/max1111.c +++ b/drivers/hwmon/max1111.c @@ -227,17 +227,7 @@ static struct spi_driver max1111_driver = { .remove = __devexit_p(max1111_remove), }; -static int __init max1111_init(void) -{ - return spi_register_driver(&max1111_driver); -} -module_init(max1111_init); - -static void __exit max1111_exit(void) -{ - spi_unregister_driver(&max1111_driver); -} -module_exit(max1111_exit); +module_spi_driver(max1111_driver); MODULE_AUTHOR("Eric Miao "); MODULE_DESCRIPTION("MAX1111 ADC Driver"); -- cgit v1.2.1