Commit 3e9f4df0 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'hwmon-for-linus-v4.16-rc2' of...

Merge tag 'hwmon-for-linus-v4.16-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging

Pull hwmon fix from Guenter Roeck:
 "Fix bad temperature display on Ryzen/Threadripper"

* tag 'hwmon-for-linus-v4.16-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
  hwmon: (k10temp) Only apply temperature offset if result is positive
parents 2439f976 aef17ca1
...@@ -129,7 +129,10 @@ static ssize_t temp1_input_show(struct device *dev, ...@@ -129,7 +129,10 @@ static ssize_t temp1_input_show(struct device *dev,
data->read_tempreg(data->pdev, &regval); data->read_tempreg(data->pdev, &regval);
temp = (regval >> 21) * 125; temp = (regval >> 21) * 125;
if (temp > data->temp_offset)
temp -= data->temp_offset; temp -= data->temp_offset;
else
temp = 0;
return sprintf(buf, "%u\n", temp); return sprintf(buf, "%u\n", temp);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment