]> git.karo-electronics.de Git - linux-beck.git/commit
hwmon: (lm85) Do not update hysteresis and temp_auto_off if auto_temp_min is changed
authorGuenter Roeck <guenter.roeck@ericsson.com>
Fri, 25 Feb 2011 16:29:51 +0000 (08:29 -0800)
committerGuenter Roeck <guenter.roeck@ericsson.com>
Tue, 15 Mar 2011 05:36:25 +0000 (22:36 -0700)
commit4f8ab430fa5dc338ce3012c91a3c7a2685d708de
treeb8d225ae5c6f3038440aee694744bf0a778463c2
parentbc6db2b5ce79b1d5c4ba2763948fa6e731d60295
hwmon: (lm85) Do not update hysteresis and temp_auto_off if auto_temp_min is changed

So far, the driver updates temp_auto_hyst and temp_auto_off if temp_auto_min changes.
This may cause problems if temp_auto_off was not configured before configuring
temp_auto_min, because one of the variables used (off_desired) is not initialized
in this case.

To simplify the code, and for consistency with other drivers, no longer update the delta
between "min" and "off" until the user sets the "off" value again.

Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Acked-by: Jean Delvare <khali@linux-fr.org>
drivers/hwmon/lm85.c