Skip to contentSkip to conversation

Fix voltage rounding in asb100

PATCH New Jean Delvare 2 participants 2 messages May 19, 2005

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix voltage rounding in asb100

Hi Greg,

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.

It applies cleanly on top of 2.6.5-mm5.

Thanks.

drivers/i2c/chips/asb100.c renamed from drivers/i2c/chips/asb100.c.orig +1 -1
@@ -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)
Signature · 2 lines
Jean Delvare
http://www.ensicaen.ismra.fr/~delvare/
Applied
#1 lore raw

PATCH 1/1 Fix voltage rounding in asb100

Quoted 6 lines · Jean Delvare

Hi Greg,

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.

It applies cleanly on top of 2.6.5-mm5.

Applied, thanks.

greg k-h