summaryrefslogtreecommitdiffstats
path: root/drivers/hwmon
diff options
context:
space:
mode:
authorGuenter Roeck <linux@roeck-us.net>2012-01-19 14:02:20 -0500
committerGuenter Roeck <guenter.roeck@ericsson.com>2012-03-18 21:27:34 -0400
commit1160631b10e48bd71500f947960efeea334e3247 (patch)
treecbe38361c670d83b82e263b1b327a193d4e942b9 /drivers/hwmon
parentbf0f3a0430b7cc33fd65d21acfd41840cba76d48 (diff)
hwmon: (lm80) Fix multi-line comments
Signed-off-by: Guenter Roeck <linux@roeck-us.net> Acked-by: Jean Delvare <khali@linux-fr.org>
Diffstat (limited to 'drivers/hwmon')
-rw-r--r--drivers/hwmon/lm80.c32
1 files changed, 19 insertions, 13 deletions
diff --git a/drivers/hwmon/lm80.c b/drivers/hwmon/lm80.c
index 6a2a777fe9cb..a996f2795db0 100644
--- a/drivers/hwmon/lm80.c
+++ b/drivers/hwmon/lm80.c
@@ -1,8 +1,8 @@
1/* 1/*
2 * lm80.c - From lm_sensors, Linux kernel modules for hardware 2 * lm80.c - From lm_sensors, Linux kernel modules for hardware
3 * monitoring 3 * monitoring
4 * Copyright (C) 1998, 1999 Frodo Looijaard <frodol@dds.nl> 4 * Copyright (C) 1998, 1999 Frodo Looijaard <frodol@dds.nl>
5 * and Philip Edelbrock <phil@netroedge.com> 5 * and Philip Edelbrock <phil@netroedge.com>
6 * 6 *
7 * Ported to Linux 2.6 by Tiago Sousa <mirage@kaotik.org> 7 * Ported to Linux 2.6 by Tiago Sousa <mirage@kaotik.org>
8 * 8 *
@@ -61,10 +61,12 @@ static const unsigned short normal_i2c[] = { 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d,
61#define LM80_REG_RES 0x06 61#define LM80_REG_RES 0x06
62 62
63 63
64/* Conversions. Rounding and limit checking is only done on the TO_REG 64/*
65 variants. Note that you should be a bit careful with which arguments 65 * Conversions. Rounding and limit checking is only done on the TO_REG
66 these macros are called: arguments may be evaluated more than once. 66 * variants. Note that you should be a bit careful with which arguments
67 Fixing this is just not worth it. */ 67 * these macros are called: arguments may be evaluated more than once.
68 * Fixing this is just not worth it.
69 */
68 70
69#define IN_TO_REG(val) (SENSORS_LIMIT(((val) + 5) / 10, 0, 255)) 71#define IN_TO_REG(val) (SENSORS_LIMIT(((val) + 5) / 10, 0, 255))
70#define IN_FROM_REG(val) ((val) * 10) 72#define IN_FROM_REG(val) ((val) * 10)
@@ -242,10 +244,12 @@ static ssize_t set_fan_min(struct device *dev, struct device_attribute *attr,
242 return count; 244 return count;
243} 245}
244 246
245/* Note: we save and restore the fan minimum here, because its value is 247/*
246 determined in part by the fan divisor. This follows the principle of 248 * Note: we save and restore the fan minimum here, because its value is
247 least surprise; the user doesn't expect the fan minimum to change just 249 * determined in part by the fan divisor. This follows the principle of
248 because the divisor changed. */ 250 * least surprise; the user doesn't expect the fan minimum to change just
251 * because the divisor changed.
252 */
249static ssize_t set_fan_div(struct device *dev, struct device_attribute *attr, 253static ssize_t set_fan_div(struct device *dev, struct device_attribute *attr,
250 const char *buf, size_t count) 254 const char *buf, size_t count)
251{ 255{
@@ -574,9 +578,11 @@ static int lm80_write_value(struct i2c_client *client, u8 reg, u8 value)
574/* Called when we have found a new LM80. */ 578/* Called when we have found a new LM80. */
575static void lm80_init_client(struct i2c_client *client) 579static void lm80_init_client(struct i2c_client *client)
576{ 580{
577 /* Reset all except Watchdog values and last conversion values 581 /*
578 This sets fan-divs to 2, among others. This makes most other 582 * Reset all except Watchdog values and last conversion values
579 initializations unnecessary */ 583 * This sets fan-divs to 2, among others. This makes most other
584 * initializations unnecessary
585 */
580 lm80_write_value(client, LM80_REG_CONFIG, 0x80); 586 lm80_write_value(client, LM80_REG_CONFIG, 0x80);
581 /* Set 11-bit temperature resolution */ 587 /* Set 11-bit temperature resolution */
582 lm80_write_value(client, LM80_REG_RES, 0x08); 588 lm80_write_value(client, LM80_REG_RES, 0x08);