]> git.baikalelectronics.ru Git - kernel.git/commit
hwmon: (f75375s) Catch some attempts to write to r/o registers
authorNikolaus Schulz <mail@microschulz.de>
Tue, 28 Feb 2012 21:15:54 +0000 (16:15 -0500)
committerGuenter Roeck <guenter.roeck@ericsson.com>
Fri, 2 Mar 2012 20:02:23 +0000 (12:02 -0800)
commita10608dbafc2783c3fe9f30f85a12d378efe3c50
treeba695785e271b487c591b86c518f32449258497a
parent05dab24481089699b8a7b8e31f4a3b3dadb36688
hwmon: (f75375s) Catch some attempts to write to r/o registers

It makes no sense to attempt to manually configure the fan in auto mode,
or set the duty cycle directly in closed loop mode.  The corresponding
registers are then read-only.  If the user tries it nonetheless, error out
with EINVAL instead of silently doing nothing.

Signed-off-by: Nikolaus Schulz <mail@microschulz.de>
[guenter.roeck@ericsson.com: Minor formatting cleanup]
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
drivers/hwmon/f75375s.c