From: Guenter Roeck Date: Fri, 18 Jul 2014 14:31:18 +0000 (-0700) Subject: hwmon: (smsc47m192) Fix temperature limit and vrm write operations X-Git-Tag: omap-for-v3.17/fixes-against-rc2~230^2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=043572d5444116b9d9ad8ae763cf069e7accbc30;p=pandora-kernel.git hwmon: (smsc47m192) Fix temperature limit and vrm write operations Temperature limit clamps are applied after converting the temperature from milli-degrees C to degrees C, so either the clamp limit needs to be specified in degrees C, not milli-degrees C, or clamping must happen before converting to degrees C. Use the latter method to avoid overflows. vrm is an u8, so the written value needs to be limited to [0, 255]. Cc: Axel Lin Cc: stable@vger.kernel.org Signed-off-by: Guenter Roeck Reviewed-by: Jean Delvare --- Reading git-diff-tree failed