summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-05-01 08:59:49 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2014-05-01 08:59:49 -0700
commitf4961366866ee34cf303b6951a5bad851be5b6fd (patch)
tree23e2fae7865287126d9cf79ee53b80a8add225a5
parent789ce9dca8007ab5d7c72b9a174a29243817ac32 (diff)
parentc0940e95f7a78be0525c8d31df0b1f71e149e57e (diff)
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"
-rw-r--r--drivers/hwmon/coretemp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/hwmon/coretemp.c b/drivers/hwmon/coretemp.c
index 6d02e3b06375..d76f0b70c6e0 100644
--- a/drivers/hwmon/coretemp.c
+++ b/drivers/hwmon/coretemp.c
@@ -365,12 +365,12 @@ static int get_tjmax(struct cpuinfo_x86 *c, u32 id, struct device *dev)
if (cpu_has_tjmax(c))
dev_warn(dev, "Unable to read TjMax from CPU %u\n", id);
} else {
- val = (eax >> 16) & 0x7f;
+ val = (eax >> 16) & 0xff;
/*
* If the TjMax is not plausible, an assumption
* will be used
*/
- if (val >= 85) {
+ if (val) {
dev_dbg(dev, "TjMax is %d degrees C\n", val);
return val * 1000;
}