]> git.hungrycats.org Git - linux/commitdiff
[PATCH] I2C: fix i2c-amd8111 driver.
authorJean Delvare <khali@linux-fr.org>
Wed, 17 Dec 2003 07:44:31 +0000 (23:44 -0800)
committerGreg Kroah-Hartman <greg@kroah.com>
Wed, 17 Dec 2003 07:44:31 +0000 (23:44 -0800)
This patch fixes i2c_smbus_write_byte() being broken for i2c-amd8111.
This causes trouble when that module is used together with eeprom (which
is also in 2.6). We have had no report so far, but the problem is
similar to the one addressed by a recent patch to i2c-nforce2.

Credits go to Hans-Frieder Vogt for finding and fixing the problem. Mark
D. Studebaker found and fixed the original problem in i2c-nforce2.

This is a serious bug fix, and I believe you shouldn't wait too long
before applying it.

drivers/i2c/busses/i2c-amd8111.c

index 1b36ab1704eb6f3f87e1f42a40ad3064566540ed..92ac246cc84c6cc562b98bdd22b68971a1fb8f07 100644 (file)
@@ -192,7 +192,7 @@ s32 amd8111_access(struct i2c_adapter * adap, u16 addr, unsigned short flags,
 
                case I2C_SMBUS_BYTE:
                        if (read_write == I2C_SMBUS_WRITE)
-                               amd_ec_write(smbus, AMD_SMB_DATA, data->byte);
+                               amd_ec_write(smbus, AMD_SMB_CMD, command);
                        protocol |= AMD_SMB_PRTCL_BYTE;
                        break;