]> git.karo-electronics.de Git - karo-tx-linux.git/commit
hwmon: (via686a) Initialize fan_div values
authorJean Delvare <khali@linux-fr.org>
Wed, 12 Jan 2011 20:55:09 +0000 (21:55 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 17 Feb 2011 23:13:36 +0000 (15:13 -0800)
commitf615f82ab0d64fd2b5a3abfdd5c2621a86255264
tree656bd606dd3844d01485c6a7a66c32e10c6a4df2
parent41098305705caab7523405c50a8d5e942f36b2b9
hwmon: (via686a) Initialize fan_div values

commit f790674d3f87df6390828ac21a7d1530f71b59c8 upstream.

Functions set_fan_min() and set_fan_div() assume that the fan_div
values have already been read from the register. The driver currently
doesn't initialize them at load time, they are only set when function
via686a_update_device() is called. This means that set_fan_min() and
set_fan_div() misbehave if, for example, "sensors -s" is called
before any monitoring application (e.g. "sensors") is has been run.

Fix the problem by always initializing the fan_div values at device
bind time.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Guenter Roeck <guenter.roeck@ericsson.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/hwmon/via686a.c