Commit:     c0f31403fe87cd2813dabb9b33107ceb56b84667
Parent:     d0546128980c18748010c758903b02909e634830
Author:     Juerg Haefliger <[EMAIL PROTECTED]>
AuthorDate: Fri Jul 20 14:16:47 2007 -0700
Committer:  Mark M. Hoffman <[EMAIL PROTECTED]>
CommitDate: Mon Jul 30 21:07:23 2007 -0400

    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>
    Acked-by: Jean Delvare <[EMAIL PROTECTED]>
    Signed-off-by: Mark M. Hoffman <[EMAIL PROTECTED]>
 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 be3aaa5..e9cbc72 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,
                res = (data->alarms >> DME1737_BIT_ALARM_TEMP[ix]) & 0x01;
        case SYS_TEMP_FAULT:
-               res = (data->temp[ix] == 0x0800);
+               res = (((u16)data->temp[ix] & 0xff00) == 0x8000);
                res = 0;
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to