mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-11-07 16:01:34 +00:00
Fix voltage rounding.
git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@1882 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
1 parent
6ca8279d3f
commit
5151325f0a
1 file changed
+1
-1
@@ -178,7 +178,7 @@ static const u8 BIT_SCFG2[] = { 0x10, 0x20, 0x40 };
|
||||
these macros are called: arguments may be evaluated more than once.
|
||||
Fixing this is just not worth it. */
|
||||
#define IN_TO_REG(val) (SENSORS_LIMIT((((val) * 10 + 8)/16),0,255))
|
||||
#define IN_FROM_REG(val) (((val) * 16) / 10)
|
||||
#define IN_FROM_REG(val) (((val) * 16 + 5) / 10)
|
||||
|
||||
static inline u8 FAN_TO_REG(long rpm, int div)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user