summaryrefslogtreecommitdiff
path: root/drivers/hwmon
diff options
context:
space:
mode:
authorGuenter Roeck <linux@roeck-us.net>2014-02-16 01:54:06 (GMT)
committerJiri Slaby <jslaby@suse.cz>2014-03-05 16:13:50 (GMT)
commit8a7cf765fa2a06c0e1e70dec1c68fc71c3ad27c8 (patch)
tree6a3dfb921343d66989cd5dac59501ec54fddd945 /drivers/hwmon
parente4df71a87ab45902153c799a9873758ef87040b0 (diff)
downloadlinux-fsl-qoriq-8a7cf765fa2a06c0e1e70dec1c68fc71c3ad27c8.tar.xz
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: Jiri Slaby <jslaby@suse.cz>
Diffstat (limited to 'drivers/hwmon')
-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 a762635..029b65e 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] = clamp_val(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);