]> 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)
commitbc7d3874c72990bfb54c4e2b34f02b2e642e3970
tree5e1e777ca2f6b49361a3dbd3b080bb1ef9131606
parentb191a1a0b798f27224fd2de9c68f88b5bfa449ed
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