From 5151325f0a057e704e985eec4817b085e9d1bd11 Mon Sep 17 00:00:00 2001 From: Jean Delvare Date: Wed, 16 Jul 2003 07:42:23 +0000 Subject: [PATCH] Fix voltage rounding. git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@1882 7894878c-1315-0410-8ee3-d5d059ff63e0 --- kernel/chips/w83781d.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/chips/w83781d.c b/kernel/chips/w83781d.c index b030189c..4945780f 100644 --- a/kernel/chips/w83781d.c +++ b/kernel/chips/w83781d.c @@ -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) {