Skip to contentSkip to conversation

hwmon: (it87) Invalidate cache on temperature

PATCH New Jean Delvare 1 participant 1 message Apr 9, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hwmon: (it87) Invalidate cache on temperature

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.

---
 drivers/hwmon/it87.c |    1 +
 1 file changed, 1 insertion(+)
drivers/hwmon/it87.c +1 -0
@@ -563,6 +563,7 @@ static ssize_t set_sensor(struct device
 	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;
 }
Signature · 6 lines
Jean Delvare

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors