hwmon: (lm95241) Fix negative temperature results
commitba46bc74116de89360aa481f7bb08d7fe3fd9f06
authorGuenter Roeck <guenter.roeck@ericsson.com>
Thu, 30 Jun 2011 09:09:37 +0000 (30 02:09 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 3 Aug 2011 19:42:24 +0000 (3 12:42 -0700)
tree1f6b4b824623cecbbb9ea88251bdc1aaf20d63a3
parent80cf500447b42c201db5116d1591d39f1d4530f1
hwmon: (lm95241) Fix negative temperature results

commit 0c2a40e2fe4f4af0410f57e84b95b817ec15aa70 upstream.

Negative temperatures were returned in degrees C instead of milli-Degrees C.
Also, negative temperatures were reported for remote temperature sensors even
if the chip was configured for positive-only results.

Fix by detecting temperature modes, and by treating negative temperatures
similar to positive temperatures, with appropriate sign extension.

Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Acked-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/hwmon/lm95241.c