]> git.baikalelectronics.ru Git - kernel.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)
commit03a67cf56353de5c822d9e9bfa0f3516fce3e94b
treeb8d225ae5c6f3038440aee694744bf0a778463c2
parenta3881c22223626cd82eecf9f252a248685026c37
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