media:pci:mgb4: Fixed negative hwmon temperatures processing

The "magic" temperature formula must be computed using a signed integer for
negative temperatures to work properly.

Signed-off-by: Martin Tůma <martin.tuma@digiteqautomotive.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
This commit is contained in:
Martin Tůma 2026-01-23 13:14:58 +01:00 committed by Hans Verkuil
parent d894419261
commit 0924f7ed0c

View File

@ -84,7 +84,8 @@ static int temp_read(struct device *dev, enum hwmon_sensor_types type, u32 attr,
int channel, long *val)
{
struct mgb4_dev *mgbdev = dev_get_drvdata(dev);
u32 val10, raw;
u32 raw;
int val10;
if (type != hwmon_temp || attr != hwmon_temp_input)
return -EOPNOTSUPP;