aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/hwmon/ds1621.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/hwmon/ds1621.c b/drivers/hwmon/ds1621.c
index c849c0c6ee9c..d5ac422d73b2 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")
53 53
54/* The DS1621 registers */ 54/* The DS1621 registers */
55#define DS1621_REG_TEMP 0xAA /* word, RO */ 55#define DS1621_REG_TEMP 0xAA /* word, RO */
56#define DS1621_REG_TEMP_MIN 0xA1 /* word, RW */ 56#define DS1621_REG_TEMP_MIN 0xA2 /* word, RW */
57#define DS1621_REG_TEMP_MAX 0xA2 /* word, RW */ 57#define DS1621_REG_TEMP_MAX 0xA1 /* word, RW */
58#define DS1621_REG_CONF 0xAC /* byte, RW */ 58#define DS1621_REG_CONF 0xAC /* byte, RW */
59#define DS1621_COM_START 0xEE /* no data */ 59#define DS1621_COM_START 0xEE /* no data */
60#define DS1621_COM_STOP 0x22 /* no data */ 60#define DS1621_COM_STOP 0x22 /* no data */
@@ -328,9 +328,9 @@ static struct ds1621_data *ds1621_update_client(struct device *dev)
328 328
329 /* reset alarms if necessary */ 329 /* reset alarms if necessary */
330 new_conf = data->conf; 330 new_conf = data->conf;
331 if (data->temp < data->temp_min) 331 if (data->temp > data->temp_min)
332 new_conf &= ~DS1621_ALARM_TEMP_LOW; 332 new_conf &= ~DS1621_ALARM_TEMP_LOW;
333 if (data->temp > data->temp_max) 333 if (data->temp < data->temp_max)
334 new_conf &= ~DS1621_ALARM_TEMP_HIGH; 334 new_conf &= ~DS1621_ALARM_TEMP_HIGH;
335 if (data->conf != new_conf) 335 if (data->conf != new_conf)
336 ds1621_write_value(client, DS1621_REG_CONF, 336 ds1621_write_value(client, DS1621_REG_CONF,