Skip to content

Commit

Permalink
hwmon: (ds1621) Update zbits after conversion rate change
Browse files Browse the repository at this point in the history
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: a50d9a4 ("hwmon: (ds1621) Fix temperature rounding operations")
Reported-by: Murat Ilsever <[email protected]>
Signed-off-by: Robert Coulson <[email protected]>
Cc: [email protected]
Signed-off-by: Guenter Roeck <[email protected]>
  • Loading branch information
robert-coulson authored and groeck committed Aug 28, 2014
1 parent 52addcf commit 39c627a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/hwmon/ds1621.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 39c627a

Please sign in to comment.