]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
hwmon: (scpi-hwmon) shows the negative temperature properly
authorRiwen Lu <luriwen@kylinos.cn>
Fri, 4 Jun 2021 03:09:59 +0000 (11:09 +0800)
committerSasha Levin <sashal@kernel.org>
Wed, 30 Jun 2021 12:48:22 +0000 (08:48 -0400)
commite6a1d16ee37c60fc30272f88ac99bf34cd9de277
tree92fb1d4d4c228d567975417c68a2f4ba76d73cbe
parent8bc97e82cae1c2eb21150aabfece872d351d0642
hwmon: (scpi-hwmon) shows the negative temperature properly

[ Upstream commit 78d13552346289bad4a9bf8eabb5eec5e5a321a5 ]

The scpi hwmon shows the sub-zero temperature in an unsigned integer,
which would confuse the users when the machine works in low temperature
environment. This shows the sub-zero temperature in an signed value and
users can get it properly from sensors.

Signed-off-by: Riwen Lu <luriwen@kylinos.cn>
Tested-by: Xin Chen <chenxin@kylinos.cn>
Link: https://lore.kernel.org/r/20210604030959.736379-1-luriwen@kylinos.cn
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/hwmon/scpi-hwmon.c