lkml.org 
[lkml]   [2004]   [Apr]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
SubjectRe: [PATCH] I2C update for 2.6.5
Date
From
ChangeSet 1.1643.36.28, 2004/04/12 15:17:24-07:00, khali@linux-fr.org

[PATCH] I2C: Fix voltage rounding in lm80

This one line patch fixes voltage rounding in the lm80 chip driver.


drivers/i2c/chips/lm80.c | 2 +-
1 files changed, 1 insertion(+), 1 deletion(-)


diff -Nru a/drivers/i2c/chips/lm80.c b/drivers/i2c/chips/lm80.c
--- a/drivers/i2c/chips/lm80.c Wed Apr 14 15:12:26 2004
+++ b/drivers/i2c/chips/lm80.c Wed Apr 14 15:12:26 2004
@@ -68,7 +68,7 @@
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,0,255))
+#define IN_TO_REG(val) (SENSORS_LIMIT(((val)+5)/10,0,255))
#define IN_FROM_REG(val) ((val)*10)

static inline unsigned char FAN_TO_REG(unsigned rpm, unsigned div)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:02    [W:0.035 / U:3.344 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site