diff options
-rw-r--r-- | drivers/i2c/busses/i2c-powermac.c | 4 | ||||
-rw-r--r-- | include/linux/i2c.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/drivers/i2c/busses/i2c-powermac.c b/drivers/i2c/busses/i2c-powermac.c index 2a0b3be..53bb435 100644 --- a/drivers/i2c/busses/i2c-powermac.c +++ b/drivers/i2c/busses/i2c-powermac.c @@ -148,8 +148,6 @@ static int i2c_powermac_master_xfer( struct i2c_adapter *adap, int read; int addrdir; - if (num != 1) - return -EINVAL; if (msgs->flags & I2C_M_TEN) return -EINVAL; read = (msgs->flags & I2C_M_RD) != 0; @@ -166,7 +164,7 @@ static int i2c_powermac_master_xfer( struct i2c_adapter *adap, rc = pmac_i2c_xfer(bus, addrdir, 0, 0, msgs->buf, msgs->len); bail: pmac_i2c_close(bus); - return rc < 0 ? rc : msgs->len; + return rc < 0 ? rc : 1; } static u32 i2c_powermac_func(struct i2c_adapter * adapter) diff --git a/include/linux/i2c.h b/include/linux/i2c.h index 526ddc8..eb0628a 100644 --- a/include/linux/i2c.h +++ b/include/linux/i2c.h @@ -193,6 +193,8 @@ struct i2c_algorithm { to NULL. If an adapter algorithm can do SMBus access, set smbus_xfer. If set to NULL, the SMBus protocol is simulated using common I2C messages */ + /* master_xfer should return the number of messages successfully + processed, or a negative value on error */ int (*master_xfer)(struct i2c_adapter *adap,struct i2c_msg *msgs, int num); int (*smbus_xfer) (struct i2c_adapter *adap, u16 addr, |