aboutsummaryrefslogtreecommitdiff
path: root/drivers/hwmon/lm77.c
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@pobox.com>2006-02-09 14:17:05 -0500
committerJeff Garzik <jgarzik@pobox.com>2006-02-09 14:17:05 -0500
commit70c07e02625ec46d0ffbfce1acef42d660803528 (patch)
treef500f1a4f93e72747fb08b0eefabb167dcdc5db9 /drivers/hwmon/lm77.c
parent5d1769ac3d0ea5ff3a286b097c21faaf6a9e6859 (diff)
parent2746b8623abce815aaae7afc946b1b39f8436f5a (diff)
Merge branch 'viro'
Diffstat (limited to 'drivers/hwmon/lm77.c')
-rw-r--r--drivers/hwmon/lm77.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/hwmon/lm77.c b/drivers/hwmon/lm77.c
index a2f420d01fb..df9e02aaa70 100644
--- a/drivers/hwmon/lm77.c
+++ b/drivers/hwmon/lm77.c
@@ -87,15 +87,15 @@ static struct i2c_driver lm77_driver = {
/* In the temperature registers, the low 3 bits are not part of the
temperature values; they are the status bits. */
-static inline u16 LM77_TEMP_TO_REG(int temp)
+static inline s16 LM77_TEMP_TO_REG(int temp)
{
int ntemp = SENSORS_LIMIT(temp, LM77_TEMP_MIN, LM77_TEMP_MAX);
- return (u16)((ntemp / 500) * 8);
+ return (ntemp / 500) * 8;
}
-static inline int LM77_TEMP_FROM_REG(u16 reg)
+static inline int LM77_TEMP_FROM_REG(s16 reg)
{
- return ((int)reg / 8) * 500;
+ return (reg / 8) * 500;
}
/* sysfs stuff */