diff options
author | Juerg Haefliger <juergh@gmail.com> | 2007-07-20 17:16:47 -0400 |
---|---|---|
committer | Mark M. Hoffman <mhoffman@lightlink.com> | 2007-07-30 21:07:23 -0400 |
commit | c0f31403fe87cd2813dabb9b33107ceb56b84667 (patch) | |
tree | 52897e19f487216fdcfa1c0c997360560dd9badf /drivers/hwmon/dme1737.c | |
parent | d0546128980c18748010c758903b02909e634830 (diff) |
hwmon: fix dme1737 temp fault attribute
Fix temp?_fault attribute. The temp was incorrectly compared against
0x0800 rather than 0x8000. Only the upper 8 bits are compared as the
datasheet doesn't specify what happens to the lower bits in case of a
diode fault.
Signed-off-by: Juerg Haefliger <juergh at gmail.com>
Acked-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
Diffstat (limited to 'drivers/hwmon/dme1737.c')
-rw-r--r-- | drivers/hwmon/dme1737.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hwmon/dme1737.c b/drivers/hwmon/dme1737.c index be3aaa5d0b91..e9cbc727664d 100644 --- a/drivers/hwmon/dme1737.c +++ b/drivers/hwmon/dme1737.c | |||
@@ -750,7 +750,7 @@ static ssize_t show_temp(struct device *dev, struct device_attribute *attr, | |||
750 | res = (data->alarms >> DME1737_BIT_ALARM_TEMP[ix]) & 0x01; | 750 | res = (data->alarms >> DME1737_BIT_ALARM_TEMP[ix]) & 0x01; |
751 | break; | 751 | break; |
752 | case SYS_TEMP_FAULT: | 752 | case SYS_TEMP_FAULT: |
753 | res = (data->temp[ix] == 0x0800); | 753 | res = (((u16)data->temp[ix] & 0xff00) == 0x8000); |
754 | break; | 754 | break; |
755 | default: | 755 | default: |
756 | res = 0; | 756 | res = 0; |