summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuenter Roeck <linux@roeck-us.net>2014-02-15 17:54:06 -0800
committerBen Hutchings <ben@decadent.org.uk>2014-04-02 00:58:54 +0100
commit8553a06b06825d49b4727c8ce4c54bd6f3d873a8 (patch)
tree5eb13795b944ea4d03e89748ae97f606de5aa2d2
parenta320419451b152ce343bd59675a5bfa0beffe9e9 (diff)
hwmon: (max1668) Fix writing the minimum temperature
commit 500a91571f0a5d0d3242d83802ea2fd1faccc66e upstream. When trying to set the minimum temperature, the driver was erroneously writing the maximum temperature into the chip. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Reviewed-by: Jean Delvare <jdelvare@suse.de> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
-rw-r--r--drivers/hwmon/max1668.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hwmon/max1668.c b/drivers/hwmon/max1668.c
index 20d1b2ddffb6..e19fef7acfa5 100644
--- a/drivers/hwmon/max1668.c
+++ b/drivers/hwmon/max1668.c
@@ -243,7 +243,7 @@ static ssize_t set_temp_min(struct device *dev,
data->temp_min[index] = SENSORS_LIMIT(temp/1000, -128, 127);
if (i2c_smbus_write_byte_data(client,
MAX1668_REG_LIML_WR(index),
- data->temp_max[index]))
+ data->temp_min[index]))
count = -EIO;
mutex_unlock(&data->update_lock);