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 482ca901db3..e5206ae00d7 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.3-70-g09d2 From 51683ee83e5a737da218bcfa064993b6cd05b946 Mon Sep 17 00:00:00 2001 From: Guenter Roeck Date: Thu, 19 Jan 2012 11:02:22 -0800 Subject: hwmon: (max1111) Fix multi-line comments Signed-off-by: Guenter Roeck --- drivers/hwmon/max1111.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'drivers/hwmon/max1111.c') diff --git a/drivers/hwmon/max1111.c b/drivers/hwmon/max1111.c index e5206ae00d7..362a40eb612 100644 --- a/drivers/hwmon/max1111.c +++ b/drivers/hwmon/max1111.c @@ -106,7 +106,8 @@ static ssize_t show_adc(struct device *dev, if (ret < 0) return ret; - /* assume the reference voltage to be 2.048V, with an 8-bit sample, + /* + * assume the reference voltage to be 2.048V, with an 8-bit sample, * the LSB weight is 8mV */ return sprintf(buf, "%d\n", ret * 8); -- cgit v1.2.3-70-g09d2