diff options
| author | Martin Tůma <martin.tuma@digiteqautomotive.com> | 2026-01-23 15:14:58 +0300 |
|---|---|---|
| committer | Hans Verkuil <hverkuil+cisco@kernel.org> | 2026-03-16 13:51:55 +0300 |
| commit | 0924f7ed0c17c9aee75c269d8ed825b8fbfb3fa3 (patch) | |
| tree | ee1d7ffc36070c6cfd61486de7e4709889954053 | |
| parent | d8944192615e3f0bb00a64dfe2e93edbb6e0a5f9 (diff) | |
| download | linux-0924f7ed0c17c9aee75c269d8ed825b8fbfb3fa3.tar.xz | |
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>
| -rw-r--r-- | drivers/media/pci/mgb4/mgb4_core.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/media/pci/mgb4/mgb4_core.c b/drivers/media/pci/mgb4/mgb4_core.c index a7351a469386..d23d854581c5 100644 --- a/drivers/media/pci/mgb4/mgb4_core.c +++ b/drivers/media/pci/mgb4/mgb4_core.c @@ -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; |
