mirror of
https://github.com/torvalds/linux.git
synced 2026-05-30 18:13:41 +02:00
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:
parent
d894419261
commit
0924f7ed0c
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user