]> git.baikalelectronics.ru Git - kernel.git/commit
hwmon: (lm77) Do not preserve hysteresis when updating critical temp limit
authorGuenter Roeck <linux@roeck-us.net>
Sun, 20 Apr 2014 15:07:42 +0000 (08:07 -0700)
committerGuenter Roeck <linux@roeck-us.net>
Wed, 21 May 2014 23:02:20 +0000 (16:02 -0700)
commit1adbce6a289fbc372bdcee161309b39eb49cebd8
tree5e1e777ca2f6b49361a3dbd3b080bb1ef9131606
parentd6d238267fc62bd26860329b9953f15629d6287a
hwmon: (lm77) Do not preserve hysteresis when updating critical temp limit

Updating the hysteresis value when updating the critical temperature limit
was following the rule of 'least surprise'. However, it had the undesirable
side effect of changing the hysteresis for all other attributes, which
defeats the purpose of least surprise. In addition, it could result in
invalid hysteresis values if the resulting hysteresis was too large. In such
cases the resulting hysteresis ended up changed anyway, which again defeats
the purpose. So drop that code and document the new behavior.

Reviewed-by: Jean Delvare <jdelvare@suse.de>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Documentation/hwmon/lm77
drivers/hwmon/lm77.c