git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
x86/bugs: Drop one "mitigation" from dmesg
[pandora-kernel.git]
/
drivers
/
hwmon
/
lm78.c
diff --git
a/drivers/hwmon/lm78.c
b/drivers/hwmon/lm78.c
index
6df0b46
..
5ce5d5a
100644
(file)
--- a/
drivers/hwmon/lm78.c
+++ b/
drivers/hwmon/lm78.c
@@
-90,6
+90,8
@@
static inline u8 FAN_TO_REG(long rpm, int div)
{
if (rpm <= 0)
return 255;
{
if (rpm <= 0)
return 255;
+ if (rpm > 1350000)
+ return 1;
return SENSORS_LIMIT((1350000 + rpm * div / 2) / (rpm * div), 1, 254);
}
return SENSORS_LIMIT((1350000 + rpm * div / 2) / (rpm * div), 1, 254);
}
@@
-100,7
+102,7
@@
static inline int FAN_FROM_REG(u8 val, int div)
/* TEMP: mC (-128C to +127C)
REG: 1C/bit, two's complement */
/* TEMP: mC (-128C to +127C)
REG: 1C/bit, two's complement */
-static inline s8 TEMP_TO_REG(
int
val)
+static inline s8 TEMP_TO_REG(
long
val)
{
int nval = SENSORS_LIMIT(val, -128000, 127000) ;
return nval<0 ? (nval-500)/1000 : (nval+500)/1000;
{
int nval = SENSORS_LIMIT(val, -128000, 127000) ;
return nval<0 ? (nval-500)/1000 : (nval+500)/1000;