diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-29 13:44:34 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-29 13:44:34 -0700 |
commit | 358a9afc35d550db4f67b1c8336f5326244ceeda (patch) | |
tree | f655236e34eb0a5d527dbd972600dd76305897df /drivers/hwmon/ds1621.c | |
parent | 55663219378eecd6fccb319be27ce6737a535e4c (diff) | |
parent | 6996abf0962bb86b6285987a4698f6d275ff531f (diff) |
Merge branch 'hwmon-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6
* 'hwmon-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6:
hwmon/applesmc: Handle name file creation error and deletion
hwmon/applesmc: Simplify dependencies
hwmon-vid: Don't spam the logs when VRM version is missing
hwmon/w83627hf: Be quiet when no chip is found
hwmon/coretemp: Add more safety checks
hwmon/ds1621: Fix swapped temperature limits
Diffstat (limited to 'drivers/hwmon/ds1621.c')
-rw-r--r-- | drivers/hwmon/ds1621.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/hwmon/ds1621.c b/drivers/hwmon/ds1621.c index c849c0c6ee9..d5ac422d73b 100644 --- a/drivers/hwmon/ds1621.c +++ b/drivers/hwmon/ds1621.c @@ -53,8 +53,8 @@ MODULE_PARM_DESC(polarity, "Output's polarity: 0 = active high, 1 = active low") /* The DS1621 registers */ #define DS1621_REG_TEMP 0xAA /* word, RO */ -#define DS1621_REG_TEMP_MIN 0xA1 /* word, RW */ -#define DS1621_REG_TEMP_MAX 0xA2 /* word, RW */ +#define DS1621_REG_TEMP_MIN 0xA2 /* word, RW */ +#define DS1621_REG_TEMP_MAX 0xA1 /* word, RW */ #define DS1621_REG_CONF 0xAC /* byte, RW */ #define DS1621_COM_START 0xEE /* no data */ #define DS1621_COM_STOP 0x22 /* no data */ @@ -328,9 +328,9 @@ static struct ds1621_data *ds1621_update_client(struct device *dev) /* reset alarms if necessary */ new_conf = data->conf; - if (data->temp < data->temp_min) + if (data->temp > data->temp_min) new_conf &= ~DS1621_ALARM_TEMP_LOW; - if (data->temp > data->temp_max) + if (data->temp < data->temp_max) new_conf &= ~DS1621_ALARM_TEMP_HIGH; if (data->conf != new_conf) ds1621_write_value(client, DS1621_REG_CONF, |