adt7473: check inputs from sysfs writes
authorDarrick J. Wong <djwong@us.ibm.com>
Wed, 12 Nov 2008 21:26:58 +0000 (13:26 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 13 Nov 2008 01:17:17 +0000 (17:17 -0800)
commit862343c4ea2ece307f25db1812637cff142d3263
tree2a15fc50b2ff1b9542c6af34b2a864c678080344
parent05a9bd46e49a9cbb09a0c61c901642a9911bf56e
adt7473: check inputs from sysfs writes

Implement correct range checking for adt7470 to prevent userland from
writing impossible values into the chip, and cap out-of-range values per
standard hwmon conventions.

Implement correct rounding of input values per standard hwmon conventions.

Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
Cc: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/hwmon/adt7473.c