]> git.baikalelectronics.ru Git - kernel.git/commit
hwmon: (it87) Properly handle wrong sensor type requests
authorJean Delvare <khali@linux-fr.org>
Wed, 14 Apr 2010 14:14:09 +0000 (16:14 +0200)
committerJean Delvare <khali@linux-fr.org>
Wed, 14 Apr 2010 14:14:09 +0000 (16:14 +0200)
commitabd6b3fc9cb2562f2d927cae5498bea03f6e1a5d
tree4a7f46597031fcede0c2fdd6851e353784070758
parentbeda710e61db1d314b63092a8af46e72c2601550
hwmon: (it87) Properly handle wrong sensor type requests

Currently, if someone tries to set the thermal sensor type to an
unsupported value, subsequent accesses to the chip may temporarily
show the sensor in question as disabled. Use a temporary variable
and only update the cached value on success, to prevent such
confusion.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
drivers/hwmon/it87.c