From: Guenter Roeck Date: Sun, 13 Apr 2014 16:15:09 +0000 (-0700) Subject: hwmon: (lm80) Simplify TEMP_FROM_REG X-Git-Tag: omap-for-v3.16/fixes-against-rc1~39^2~32^2~9 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9028ff8e3dd207375d2459079f728322671069ac;p=pandora-kernel.git hwmon: (lm80) Simplify TEMP_FROM_REG TEMP_FROM_REG gets 12 bits of temperature data in the upper 12 bit of a signed 16 bit parameter, with the integer part (including sign) in the upper 8 bit and the remainder in bit 4..7. The lower 4 bit of the 16 bit data is always 0. We can use that information to convert the temperature directly into display data (1/1000th of degree C). Note that the stored temperature data is not shifted right as the comment claimed, so remove that misleading comment. Signed-off-by: Guenter Roeck --- Reading git-diff-tree failed