aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/hwmon-vid.c
diff options
context:
space:
mode:
authorJean Delvare <khali@linux-fr.org>2007-01-18 16:14:23 -0500
committerJean Delvare <khali@arrakis.delvare>2007-01-18 16:14:23 -0500
commit9fab2d8b75a4084e91f1dcb4e55368406fe53010 (patch)
treeed09a7dbf177b2962a07f92ea0b7da6632418343 /drivers/hwmon/hwmon-vid.c
parentddca933bd554b4f81f27776f3cb9daa67cf241b1 (diff)
hwmon: Fix the VRD 11 decoding
I wonder how we came up with such a broken test in the first place. Signed-off-by: Jean Delvare <khali@linux-fr.org>
Diffstat (limited to 'drivers/hwmon/hwmon-vid.c')
-rw-r--r--drivers/hwmon/hwmon-vid.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hwmon/hwmon-vid.c b/drivers/hwmon/hwmon-vid.c
index 31c42002708f..b80f6ed5acfc 100644
--- a/drivers/hwmon/hwmon-vid.c
+++ b/drivers/hwmon/hwmon-vid.c
@@ -93,7 +93,7 @@ int vid_from_reg(int val, u8 vrm)
93 case 110: /* Intel Conroe */ 93 case 110: /* Intel Conroe */
94 /* compute in uV, round to mV */ 94 /* compute in uV, round to mV */
95 val &= 0xff; 95 val &= 0xff;
96 if(((val & 0x7e) == 0xfe) || (!(val & 0x7e))) 96 if (val < 0x02 || val > 0xb2)
97 return 0; 97 return 0;
98 return((1600000 - (val - 2) * 6250 + 500) / 1000); 98 return((1600000 - (val - 2) * 6250 + 500) / 1000);
99 case 24: /* Opteron processor */ 99 case 24: /* Opteron processor */