aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hwmon
diff options
context:
space:
mode:
authorJean Delvare <khali@linux-fr.org>2010-04-14 10:14:10 -0400
committerJean Delvare <khali@linux-fr.org>2010-04-14 10:14:10 -0400
commit2b3d1d87eaabf422a42440351ff3be1792d35852 (patch)
tree692f159899cfa29bb33c9394c1c6616a106a11a2 /drivers/hwmon
parent8acf07c5a7674e53f2d320d540aec5d714b105cf (diff)
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>
Diffstat (limited to 'drivers/hwmon')
-rw-r--r--drivers/hwmon/it87.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/hwmon/it87.c b/drivers/hwmon/it87.c
index a65ba31cad2..5be09c048c5 100644
--- a/drivers/hwmon/it87.c
+++ b/drivers/hwmon/it87.c
@@ -563,6 +563,7 @@ static ssize_t set_sensor(struct device *dev, struct device_attribute *attr,
563 mutex_lock(&data->update_lock); 563 mutex_lock(&data->update_lock);
564 data->sensor = reg; 564 data->sensor = reg;
565 it87_write_value(data, IT87_REG_TEMP_ENABLE, data->sensor); 565 it87_write_value(data, IT87_REG_TEMP_ENABLE, data->sensor);
566 data->valid = 0; /* Force cache refresh */
566 mutex_unlock(&data->update_lock); 567 mutex_unlock(&data->update_lock);
567 return count; 568 return count;
568} 569}