diff options
author | Guenter Roeck <linux@roeck-us.net> | 2014-02-15 20:54:06 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-03-07 00:30:11 -0500 |
commit | 755ac7af96bdc50bf65254ac3699e0279a342440 (patch) | |
tree | 4a3f25c030b2d5850624532b3518c534011ad7f0 | |
parent | 2bc744aa8bb9eaff8facd237c359cf64bf6ec239 (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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/hwmon/max1668.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hwmon/max1668.c b/drivers/hwmon/max1668.c index a7626358c95d..029b65e6c589 100644 --- a/drivers/hwmon/max1668.c +++ b/drivers/hwmon/max1668.c | |||
@@ -243,7 +243,7 @@ static ssize_t set_temp_min(struct device *dev, | |||
243 | data->temp_min[index] = clamp_val(temp/1000, -128, 127); | 243 | data->temp_min[index] = clamp_val(temp/1000, -128, 127); |
244 | if (i2c_smbus_write_byte_data(client, | 244 | if (i2c_smbus_write_byte_data(client, |
245 | MAX1668_REG_LIML_WR(index), | 245 | MAX1668_REG_LIML_WR(index), |
246 | data->temp_max[index])) | 246 | data->temp_min[index])) |
247 | count = -EIO; | 247 | count = -EIO; |
248 | mutex_unlock(&data->update_lock); | 248 | mutex_unlock(&data->update_lock); |
249 | 249 | ||