hwmon: (adm1029) Update fan_div cache when writing fan divisor attribute
Subsystems (2)
Guenter Roeck
maintainerPATCH 1/1 hwmon: (adm1029) Update fan_div cache when writing fan divisor attribute
When writing a new value into the fan1_div or fan2_div attribute, the written value was not copied into the cache. This could result in reading an old attribute value for up to two seconds after updating the fan divisor, since values are cached for that long by the driver.
Signed-off-by Guenter Roeck <[email protected]>
--- drivers/hwmon/adm1029.c | 1 + 1 file changed, 1 insertion(+)
drivers/hwmon/adm1029.c +1 -0
@@ -235,6 +235,7 @@ static ssize_t set_fan_div(struct device *dev,/* Write value */ i2c_smbus_write_byte_data (client,ADM1029_REG_FAN_DIV [attr->index], reg); + data->fan_div[attr->index] = reg;mutex_unlock (&data->update_lock);return count;
Signature · 7 lines
1.9.1 _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors