From: Guenter Roeck Date: Tue, 5 Aug 2014 16:54:04 +0000 (-0700) Subject: hwmon: (emc6w201) Fix temperature limit range X-Git-Tag: omap-for-v3.17/fixes-against-rc2~68^2~12 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=539a719f9b90f37b934b90ad52be646b9e74a9f6;p=pandora-kernel.git hwmon: (emc6w201) Fix temperature limit range Temperature limit range is [-127, 127], not [-127, 128]. The wrong range caused a bad limit to be written into the chip if the limit was set to a value of 128 degrees C or above. Also use DIV_ROUND_CLOSEST instead of a plain divide operation to reduce the rounding error when writing temperature limits. Signed-off-by: Guenter Roeck Reviewed-by: Jean Delvare --- Reading git-diff-tree failed