]> git.baikalelectronics.ru Git - kernel.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)
committerGuenter Roeck <guenter.roeck@ericsson.com>
Wed, 16 Feb 2011 16:18:33 +0000 (08:18 -0800)
commit4cafab9c24187cd55df23f33d356d9cc42bf5d1d
treee2b8f4639578e4f81e9371778c6f45faabe3c87e
parent500a80f8398dd617205d32a3075221a5f5f40bd4
hwmon: (jc42) do not allow writing to locked registers

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>
Cc: stable@kernel.org
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Documentation/hwmon/jc42
drivers/hwmon/jc42.c