From 73b03907bbbfdd7b94300db245806dd070ec79ab Mon Sep 17 00:00:00 2001 From: =?utf8?q?=E6=9F=AF=E9=A3=9E=E9=9B=84?= Date: Tue, 11 May 2010 14:21:07 +0000 Subject: [PATCH] add i2c --- drivers/i2c/i2c-core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c index 3bf7b0a270f5..94ceb1702df3 100644 --- a/drivers/i2c/i2c-core.c +++ b/drivers/i2c/i2c-core.c @@ -1738,8 +1738,8 @@ static s32 i2c_smbus_xfer_emulated(struct i2c_adapter * adapter, u16 addr, unsigned char msgbuf0[I2C_SMBUS_BLOCK_MAX+3]; unsigned char msgbuf1[I2C_SMBUS_BLOCK_MAX+2]; int num = read_write == I2C_SMBUS_READ?2:1; - struct i2c_msg msg[2] = { { addr, flags, 1, msgbuf0 }, - { addr, flags | I2C_M_RD, 0, msgbuf1 } + struct i2c_msg msg[2] = { { 0, addr, flags, 1, msgbuf0 }, + { 0, addr, flags | I2C_M_RD, 0, msgbuf1 } }; int i; u8 partial_pec = 0; -- 2.34.1