From: Jean Delvare Date: Wed, 14 Apr 2010 14:14:10 +0000 (+0200) Subject: hwmon: (it87) Invalidate cache on temperature sensor change X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=2b3d1d87eaabf422a42440351ff3be1792d35852;p=openwrt%2Fstaging%2Fblogic.git 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 --- diff --git a/drivers/hwmon/it87.c b/drivers/hwmon/it87.c index a65ba31cad29..5be09c048c5f 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, 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; }