]> git.hungrycats.org Git - linux/commitdiff
[PATCH] I2C: fix i2c_smbus_write_byte() for i2c-nforce2
authorJean Delvare <khali@linux-fr.org>
Thu, 4 Dec 2003 06:14:33 +0000 (22:14 -0800)
committerGreg Kroah-Hartman <greg@kroah.com>
Thu, 4 Dec 2003 06:14:33 +0000 (22:14 -0800)
This patch fixes i2c_smbus_write_byte() being broken for i2c-nforce2.
This causes trouble when that module is used together with eeprom (which
is also in 2.6). We have had three user reports about the problem.

Credits go to Mark D. Studebaker for finding and fixing the problem.

drivers/i2c/busses/i2c-nforce2.c

index b710d93b12b347029df50c08bb9db686651ea6d2..7033d2fe3a06b947452c761a225b491249727e91 100644 (file)
@@ -147,7 +147,7 @@ static s32 nforce2_access(struct i2c_adapter * adap, u16 addr,
 
                case I2C_SMBUS_BYTE:
                        if (read_write == I2C_SMBUS_WRITE)
-                               outb_p(data->byte, NVIDIA_SMB_DATA);
+                               outb_p(command, NVIDIA_SMB_CMD);
                        protocol |= NVIDIA_SMB_PRTCL_BYTE;
                        break;