mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-10 07:10:27 +00:00
hwmon: (it87) Invalidate cache on temperature sensor change
When any temperature sensor type is changed, the corresponding temperature value needs to be updated. The register caching mechanism may delay this update, so we want to invalidate the cache to force an immediate update. Signed-off-by: Jean Delvare <khali@linux-fr.org>
This commit is contained in:
parent
8acf07c5a7
commit
2b3d1d87ea
@ -563,6 +563,7 @@ static ssize_t set_sensor(struct device *dev, struct device_attribute *attr,
|
||||
mutex_lock(&data->update_lock);
|
||||
data->sensor = reg;
|
||||
it87_write_value(data, IT87_REG_TEMP_ENABLE, data->sensor);
|
||||
data->valid = 0; /* Force cache refresh */
|
||||
mutex_unlock(&data->update_lock);
|
||||
return count;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user