hwmon: (amc6821) sign extension temperature
authorJared Bents <jared.bents@rockwellcollins.com>
Sat, 19 Nov 2016 04:20:38 +0000 (22:20 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 12 Jan 2017 10:39:25 +0000 (11:39 +0100)
commit29e7b170db90a852b51409a76870cdbe57341a9b
treeb435bf57e7d942138a2f480cb27288283ecb0a6a
parentaf3cd3f0a805ab701f1e56ed93c676c77b7d2169
hwmon: (amc6821) sign extension temperature

commit 4538bfbf2d9f1fc48c07ac0cc0ee58716fe7fe96 upstream.

Converts the unsigned temperature values from the i2c read
to be sign extended as defined in the datasheet so that
negative temperatures are properly read.

Fixes: 28e6274d8fa67 ("hwmon: (amc6821) Avoid forward declaration")
Signed-off-by: Jared Bents <jared.bents@rockwellcollins.com>
Signed-off-by: Matt Weber <matthew.weber@rockwellcollins.com>
[groeck: Dropped unnecessary continuation line]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/hwmon/amc6821.c