]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
hwmon: (nct7904) Fix incorrect range of temperature limit registers
authorAmy Shih <amy.shih@advantech.com.tw>
Tue, 12 May 2020 09:38:06 +0000 (09:38 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 3 Jun 2020 06:23:10 +0000 (08:23 +0200)
commit991b56360235756c3128061baee413975bdb7c9f
treed27bfa44ebebd98d3f2f82abe1c4a7496feee5b7
parent8f4f1a9b20d7a5c741078d08b6b32aaa323401f1
hwmon: (nct7904) Fix incorrect range of temperature limit registers

[ Upstream commit 7b2fd270af27edaf02acb41a7babe805a9441914 ]

The format of temperature limitation registers are 8-bit 2's complement
and the range is -128~127.
Converts the reading value to signed char to fix the incorrect range
of temperature limitation registers.

Signed-off-by: Amy Shih <amy.shih@advantech.com.tw>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/hwmon/nct7904.c