Commit 2b3d1d87eaabf422a42440351ff3be1792d35852

Authored by Jean Delvare
1 parent 8acf07c5a7

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>

Showing 1 changed file with 1 additions and 0 deletions Side-by-side Diff

drivers/hwmon/it87.c
... ... @@ -563,6 +563,7 @@
563 563 mutex_lock(&data->update_lock);
564 564 data->sensor = reg;
565 565 it87_write_value(data, IT87_REG_TEMP_ENABLE, data->sensor);
  566 + data->valid = 0; /* Force cache refresh */
566 567 mutex_unlock(&data->update_lock);
567 568 return count;
568 569 }