hwmon: (max1668) Fix writing the minimum temperature
Guenter Roeck
maintainerPATCH 1/3 hwmon: (max1668) Fix writing the minimum temperature
When trying to set the minimum temperature, the driver was erroneously writing the maximum temperature into the chip.
Signed-off-by Guenter Roeck <[email protected]>
---
Candidate for -stable.
drivers/hwmon/max1668.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/hwmon/max1668.c +1 -1
@@ -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);
Signature · 7 lines
1.7.9.7 _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Quoted 15 lines · Guenter Roeck
When trying to set the minimum temperature, the driver was erroneously writing the maximum temperature into the chip.
Signed-off-by Guenter Roeck <[email protected]>---
Candidate for -stable.drivers/hwmon/max1668.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/hwmon/max1668.c +0
-0
drivers/hwmon/max1668.c static ssize_t set_temp_min(struct device *dev, · line 249
Quoted 8 lines
drivers/hwmon/max1668.c +1
-1@@ -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);
Huh, bad bug, good catch.
Definitely good for -stable, even though it may not be the most popular hwmon driver.
Reviewed-by Jean Delvare <[email protected]>
Signature · 7 lines
Jean Delvare Suse L3 Support _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors