Files
linux/drivers
Ji-Ze Hong (Peter Hong) 0457a3c3a5 hwmon: (f71882fg) Fix negative temperature
[ Upstream commit 4aaaaf0f27 ]

All temperature of Fintek superio hwmonitor that using 1-byte reg will use
2's complement.

In show_temp()
	temp = data->temp[nr] * 1000;

When data->temp[nr] read as 255, it indicate -1C, but this code will report
255C to userspace. It'll be ok when change to:
	temp = ((s8)data->temp[nr]) * 1000;

Signed-off-by: Ji-Ze Hong (Peter Hong) <hpeter+linux_kernel@gmail.com>
Link: https://lore.kernel.org/r/20220418090706.6339-1-hpeter+linux_kernel@gmail.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-05-18 09:15:43 +02:00
..
2021-12-14 10:04:48 +01:00
2021-11-26 11:48:20 +01:00
2022-03-02 11:32:03 +01:00
2022-05-12 12:14:53 +02:00
2020-12-29 13:45:00 +01:00
2022-04-20 09:06:42 +02:00
2022-05-12 12:14:56 +02:00