]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
hwmon: (coretemp) Relax target temperature range check
authorJean Delvare <khali@linux-fr.org>
Tue, 31 May 2011 19:50:51 +0000 (15:50 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 23 Jun 2011 22:05:33 +0000 (15:05 -0700)
commit 4c6e0f8101e62d8b2d01dc94b835a98b191a1454 upstream.

The current temperature range check of MSR_IA32_TEMPERATURE_TARGET
seems too strict to me, some TjMax values documented in
Documentation/hwmon/coretemp wouldn't pass. Relax the check so that
all the documented values pass.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Carsten Emde <C.Emde@osadl.org>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/hwmon/coretemp.c

index 9bc9f95b6e84d0381aca63267fcc4cfc28bfd9f1..08cea44ea265da3c4354d1b9ae7e676550f91f9f 100644 (file)
@@ -263,7 +263,7 @@ static int __devinit get_tjmax(struct cpuinfo_x86 *c, u32 id,
                 * If the TjMax is not plausible, an assumption
                 * will be used
                 */
-               if ((val > 80) && (val < 120)) {
+               if (val >= 70 && val <= 125) {
                        dev_info(dev, "TjMax is %d C.\n", val);
                        return val * 1000;
                }