Re: [PATCH] I2C update for 2.6.5

From: Greg KH
Date: Wed Apr 14 2004 - 18:19:47 EST


ChangeSet 1.1643.36.30, 2004/04/14 13:10:38-07:00, khali@xxxxxxxxxxxx

[PATCH] I2C: Fix voltage rounding in asb100

This one line patch fixes voltage rounding in the asb100 chip driver.
It's very similar to a patch I submitted for the lm80 a few days ago.


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


diff -Nru a/drivers/i2c/chips/asb100.c b/drivers/i2c/chips/asb100.c
--- a/drivers/i2c/chips/asb100.c Wed Apr 14 15:12:13 2004
+++ b/drivers/i2c/chips/asb100.c Wed Apr 14 15:12:13 2004
@@ -124,7 +124,7 @@
static u8 IN_TO_REG(unsigned val)
{
unsigned nval = SENSORS_LIMIT(val, ASB100_IN_MIN, ASB100_IN_MAX);
- return nval / 16;
+ return (nval + 8) / 16;
}

static unsigned IN_FROM_REG(u8 reg)

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/