diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-02-07 19:29:27 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-02-07 19:29:27 -0500 |
commit | b4669d66fb1488fd9cebe0b8da447cfeb86109ba (patch) | |
tree | 2beaba0e7d8acac9703667aff5f9bc9f4d4357d6 /drivers/hwmon/lm77.c | |
parent | b43d4ddaec2b33fd6eaf0bed970c86ab08a52aaf (diff) | |
parent | c5e3fbf22ccba0879b174fab7ec0e322b1266c2c (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/i2c-2.6
Diffstat (limited to 'drivers/hwmon/lm77.c')
-rw-r--r-- | drivers/hwmon/lm77.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/hwmon/lm77.c b/drivers/hwmon/lm77.c index a2f420d01fb7..df9e02aaa70a 100644 --- a/drivers/hwmon/lm77.c +++ b/drivers/hwmon/lm77.c | |||
@@ -87,15 +87,15 @@ static struct i2c_driver lm77_driver = { | |||
87 | 87 | ||
88 | /* In the temperature registers, the low 3 bits are not part of the | 88 | /* In the temperature registers, the low 3 bits are not part of the |
89 | temperature values; they are the status bits. */ | 89 | temperature values; they are the status bits. */ |
90 | static inline u16 LM77_TEMP_TO_REG(int temp) | 90 | static inline s16 LM77_TEMP_TO_REG(int temp) |
91 | { | 91 | { |
92 | int ntemp = SENSORS_LIMIT(temp, LM77_TEMP_MIN, LM77_TEMP_MAX); | 92 | int ntemp = SENSORS_LIMIT(temp, LM77_TEMP_MIN, LM77_TEMP_MAX); |
93 | return (u16)((ntemp / 500) * 8); | 93 | return (ntemp / 500) * 8; |
94 | } | 94 | } |
95 | 95 | ||
96 | static inline int LM77_TEMP_FROM_REG(u16 reg) | 96 | static inline int LM77_TEMP_FROM_REG(s16 reg) |
97 | { | 97 | { |
98 | return ((int)reg / 8) * 500; | 98 | return (reg / 8) * 500; |
99 | } | 99 | } |
100 | 100 | ||
101 | /* sysfs stuff */ | 101 | /* sysfs stuff */ |