hwmon: (ds1621) Update zbits after conversion rate change
PATCH v2 1/1 hwmon: (ds1621) Update zbits after conversion rate change
From: Robert Coulson <[email protected]>
After the conversion rate is changed, the zbits are not updated, but should be, since they are used later in the set_temp function.
Fixes a50d9a4d9ad3 ("hwmon: (ds1621) Fix temperature rounding operations")
Reported-by Murat Ilsever <[email protected]>
Signed-off-by Robert Coulson <[email protected]>
--- drivers/hwmon/ds1621.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
drivers/hwmon/ds1621.c +1 -0
@@ -309,6 +309,7 @@ static ssize_t set_convrate(struct device *dev, struct device_attribute *da, data->conf |= (resol <<DS1621_REG_CONFIG_RESOL_SHIFT );i2c_smbus_write_byte_data (client,DS1621_REG_CONF , data->conf); data->update_interval = ds1721_convrates[resol]; + data->zbits =7 - resol;mutex_unlock (&data->update_lock);return count;
Signature · 7 lines
1.7.3.1 _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Quoted 9 lines · Robert Coulson
From: Robert Coulson <[email protected]>
After the conversion rate is changed, the zbits are not updated, but should be, since they are used later in the
set_tempfunction.Fixes a50d9a4d9ad3 ("hwmon: (ds1621) Fix temperature rounding operations")Reported-by Murat Ilsever <[email protected]>Signed-off-by Robert Coulson <[email protected]>
Applied.
Thanks,
Guenter
_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors