]> git.karo-electronics.de Git - karo-tx-linux.git/commit
hwmon: (jc42) do not allow writing to locked registers
authorClemens Ladisch <clemens@ladisch.de>
Wed, 16 Feb 2011 13:02:38 +0000 (08:02 -0500)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 24 Feb 2011 22:54:36 +0000 (14:54 -0800)
commit53b9575ce4ac028c83c4b3ed944e8941cf984257
tree55a94045ed5e3ea69a262b29fe6ab2de0b303ca4
parent12e9bb0276725726bb316e706c48d856f9664f32
hwmon: (jc42) do not allow writing to locked registers

commit 2c6315da6a1657a49e03970a4084dc3d1958ad70 upstream.

On systems where the temperature sensor is actually used, the BIOS is
likely to have locked the alarm registers.  In that case, all writes
through the corresponding sysfs files would be silently ignored.

To prevent this, detect the locks and make the affected sysfs files
read-only.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Documentation/hwmon/jc42
drivers/hwmon/jc42.c