hwmon: (f71805f) Fix clamping of temperature limits
commit543c6a0b0b461a32895b3edfada5ee57f8591905
authorJean Delvare <khali@linux-fr.org>
Fri, 20 Jan 2012 15:09:23 +0000 (20 10:09 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 3 Feb 2012 17:22:15 +0000 (3 09:22 -0800)
tree78a8144d98bacc5e06ea2b51b600b1845c5e915f
parent8df2b7563cdac05f834dee4f4743028f69ba1639
hwmon: (f71805f) Fix clamping of temperature limits

commit 86b2bbfdbd1fcc4a3aa62ccd3f245c40c5ad5b85 upstream.

Properly clamp temperature limits set by the user. Without this fix,
attempts to write temperature limits above the maximum supported by
the chip (255 degrees Celsius) would arbitrarily and unexpectedly
result in the limit being set to 0 degree Celsius.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/hwmon/f71805f.c