hwmon: (lm80) Simplify TEMP_FROM_REG
commit9028ff8e3dd207375d2459079f728322671069ac
authorGuenter Roeck <linux@roeck-us.net>
Sun, 13 Apr 2014 16:15:09 +0000 (13 09:15 -0700)
committerGuenter Roeck <linux@roeck-us.net>
Wed, 21 May 2014 23:02:26 +0000 (21 16:02 -0700)
tree576b41634eafdbd43a50ed5eaa3c9a3981b7c989
parenta0ac840d99fa7c2ebf5a3df0367992722a92ca65
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 <linux@roeck-us.net>
drivers/hwmon/lm80.c