summaryrefslogtreecommitdiff
path: root/drivers/hwmon
diff options
context:
space:
mode:
authorGuenter Roeck <linux@roeck-us.net>2014-02-16 05:54:06 +0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-03-12 03:10:01 +0400
commit8d36299431351e5c3a893d9c1eae7579ebc57ad5 (patch)
tree0fff306be2a8ad2253553a8ef1bcbf61c5dad5c9 /drivers/hwmon
parent564a4d6c3205fc001579c00a0ce19b665f860487 (diff)
downloadlinux-8d36299431351e5c3a893d9c1eae7579ebc57ad5.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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
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 335b183d7c02..f058886ca892 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);