hwmon: (emc2103) Clamp limits instead of bailing out
authorGuenter Roeck <linux@roeck-us.net>
Sun, 6 Jul 2014 18:39:24 +0000 (11:39 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 17 Jul 2014 23:21:03 +0000 (16:21 -0700)
commit0d408dd6ad0b76e7d462f815bacc5ecc8f4a108c
tree1b24b87e6b4abaa378217ba90b8865ff9cdd0bf5
parent66b1027e8349619956111177d7dc7170f9543f25
hwmon: (emc2103) Clamp limits instead of bailing out

commit f6c2dd20108c35e30e2c1f3c6142d189451a626b upstream.

It is customary to clamp limits instead of bailing out with an error
if a configured limit is out of the range supported by the driver.
This simplifies limit configuration, since the user will not typically
know chip and/or driver specific limits.

Reviewed-by: Jean Delvare <jdelvare@suse.de>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/hwmon/emc2103.c