Commit f4961366 authored by Linus Torvalds's avatar Linus Torvalds

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

Pull hwmon fix from Guenter Roeck:
 "Fix Tjmax detection in coretemp driver"

* tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
  Revert "hwmon: (coretemp) Refine TjMax detection"
parents 789ce9dc c0940e95
...@@ -365,12 +365,12 @@ static int get_tjmax(struct cpuinfo_x86 *c, u32 id, struct device *dev) ...@@ -365,12 +365,12 @@ static int get_tjmax(struct cpuinfo_x86 *c, u32 id, struct device *dev)
if (cpu_has_tjmax(c)) if (cpu_has_tjmax(c))
dev_warn(dev, "Unable to read TjMax from CPU %u\n", id); dev_warn(dev, "Unable to read TjMax from CPU %u\n", id);
} else { } else {
val = (eax >> 16) & 0x7f; val = (eax >> 16) & 0xff;
/* /*
* If the TjMax is not plausible, an assumption * If the TjMax is not plausible, an assumption
* will be used * will be used
*/ */
if (val >= 85) { if (val) {
dev_dbg(dev, "TjMax is %d degrees C\n", val); dev_dbg(dev, "TjMax is %d degrees C\n", val);
return val * 1000; return val * 1000;
} }
......
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