Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 39c627a0 authored by Robert Coulson's avatar Robert Coulson Committed by Guenter Roeck
Browse files

hwmon: (ds1621) Update zbits after conversion rate change



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: a50d9a4d ("hwmon: (ds1621) Fix temperature rounding operations")
Reported-by: default avatarMurat Ilsever <murat.ilsever@gmail.com>
Signed-off-by: default avatarRobert Coulson <rob.coulson@gmail.com>
Cc: stable@vger.kernel.org
Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
parent 52addcf9
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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;