Re: [PATCH] PCI and I2C fixes for 2.6.8

From: Greg KH
Date: Mon Aug 23 2004 - 19:17:55 EST


ChangeSet 1.1807.56.38, 2004/08/09 13:42:54-07:00, khali@xxxxxxxxxxxx

[PATCH] I2C: fix for previous lm83 driver update

Signed-off-by: Jean Delvare <khali at linux-fr dot org>
Signed-off-by: Greg Kroah-Hartman <greg@xxxxxxxxx>


drivers/i2c/chips/lm83.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)


diff -Nru a/drivers/i2c/chips/lm83.c b/drivers/i2c/chips/lm83.c
--- a/drivers/i2c/chips/lm83.c 2004-08-23 11:03:01 -07:00
+++ b/drivers/i2c/chips/lm83.c 2004-08-23 11:03:01 -07:00
@@ -83,10 +83,10 @@
* The LM83 uses signed 8-bit values.
*/

-#define TEMP_FROM_REG(val) (((val) > 127 ? (val)-0xFF : (val)) * 1000)
-#define TEMP_TO_REG(val) ((val) <= -50000 ? -50 + 0xFF : (val) >= 127000 ? 127 : \
+#define TEMP_FROM_REG(val) (((val) > 127 ? (val) - 0x100 : (val)) * 1000)
+#define TEMP_TO_REG(val) ((val) <= -50000 ? -50 + 0x100 : (val) >= 127000 ? 127 : \
(val) > -500 ? ((val)+500) / 1000 : \
- ((val)-500) / 1000 + 0xFF)
+ ((val)-500) / 1000 + 0x100)

static const u8 LM83_REG_R_TEMP[] = {
LM83_REG_R_LOCAL_TEMP,

-
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/