]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
hwmon: (adm1031) Fix register overwrite in set_fan_div()
authorJean Delvare <khali@linux-fr.org>
Sun, 2 Dec 2007 22:32:42 +0000 (23:32 +0100)
committerMark M. Hoffman <mhoffman@lightlink.com>
Fri, 8 Feb 2008 01:39:43 +0000 (20:39 -0500)
commit38a1f0e9aed014be66c474ecd9fe8513646de833
treed7a4a529cdd6eed323cce893e70c3861ab243b37
parentd5b0b5d62823f08ab4988e1b179fd5a9bddced31
hwmon: (adm1031) Fix register overwrite in set_fan_div()

Don't rely on the register cache when setting a new fan clock divider.
For one thing, the cache might not have been initialized at all if the
driver has just been loaded. For another, the cached values may be old
and you never know what can happen in the driver's back.

Also invalidate the cache instead of trying to adjust the measured fan
speed: the whole point of changing the clock divider is to get a better
reading.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
drivers/hwmon/adm1031.c