hwmon: (ds620) Fix handling of negative temperatures
authorRoland Stigge <stigge@antcom.de>
Wed, 21 Sep 2011 17:06:11 +0000 (13:06 -0400)
committerGuenter Roeck <guenter.roeck@ericsson.com>
Thu, 22 Sep 2011 00:25:18 +0000 (17:25 -0700)
Signed (negative) temperatures were not handled correctly.

Signed-off-by: Roland Stigge <stigge@antcom.de>
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Cc: stable@kernel.org # v2.6.38+
drivers/hwmon/ds620.c

index 257957c69d9229f8ffa76cec6d303a01f0d8d2e5..4f7c3fc40a89616b9d0f8497dc7aa97c0a31ec2d 100644 (file)
@@ -72,7 +72,7 @@ struct ds620_data {
        char valid;             /* !=0 if following fields are valid */
        unsigned long last_updated;     /* In jiffies */
 
-       u16 temp[3];            /* Register values, word */
+       s16 temp[3];            /* Register values, word */
 };
 
 /*