Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 84510
b: refs/heads/master
c: 7224030
h: refs/heads/master
v: v3
  • Loading branch information
Jean Delvare authored and Mark M. Hoffman committed Feb 8, 2008
1 parent a16023c commit 5cb2397
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 21df67b191fd612fa28aedd39ec1414d8effc454
refs/heads/master: 72240307e988627df46553846936aa89a0f6a283
6 changes: 3 additions & 3 deletions trunk/drivers/hwmon/gl518sm.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,10 @@ static inline u8 FAN_TO_REG(long rpm, int div)
long rpmdiv;
if (rpm == 0)
return 0;
rpmdiv = SENSORS_LIMIT(rpm, 1, 1920000) * div;
return SENSORS_LIMIT((960000 + rpmdiv / 2) / rpmdiv, 1, 255);
rpmdiv = SENSORS_LIMIT(rpm, 1, 960000) * div;
return SENSORS_LIMIT((480000 + rpmdiv / 2) / rpmdiv, 1, 255);
}
#define FAN_FROM_REG(val,div) ((val)==0 ? 0 : (960000/((val)*(div))))
#define FAN_FROM_REG(val,div) ((val)==0 ? 0 : (480000/((val)*(div))))

#define IN_TO_REG(val) (SENSORS_LIMIT((((val)+9)/19),0,255))
#define IN_FROM_REG(val) ((val)*19)
Expand Down

0 comments on commit 5cb2397

Please sign in to comment.