diff options
author | Jean Delvare <khali@linux-fr.org> | 2006-07-01 17:12:53 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-07-12 15:43:07 -0700 |
commit | 8ced8eee8537b52ef5d77e28d7676ce81bc62359 (patch) | |
tree | e4d71d931ea64159e5864ccc4ca8008db563e1cf /include/linux/i2c.h | |
parent | c3efacaa68a75049a859cbfd03d52dfdebb7527b (diff) |
[PATCH] i2c-powermac: Fix master_xfer return value
Fix the value returned by the i2c-powermac's master_xfer method.
It should return the number of messages processed successfully, but
instead returns the number of data bytes in the first (and only)
processed message.
Also explicitly mention the master_xfer convention so that future
implementations get it right directly.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'include/linux/i2c.h')
-rw-r--r-- | include/linux/i2c.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/i2c.h b/include/linux/i2c.h index 526ddc8eecfb..eb0628a7ecc6 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, |