aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJean Delvare <khali@linux-fr.org>2006-07-01 11:12:53 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2006-07-12 18:43:07 -0400
commit8ced8eee8537b52ef5d77e28d7676ce81bc62359 (patch)
treee4d71d931ea64159e5864ccc4ca8008db563e1cf /include
parentc3efacaa68a75049a859cbfd03d52dfdebb7527b (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')
-rw-r--r--include/linux/i2c.h2
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 {
193 to NULL. If an adapter algorithm can do SMBus access, set 193 to NULL. If an adapter algorithm can do SMBus access, set
194 smbus_xfer. If set to NULL, the SMBus protocol is simulated 194 smbus_xfer. If set to NULL, the SMBus protocol is simulated
195 using common I2C messages */ 195 using common I2C messages */
196 /* master_xfer should return the number of messages successfully
197 processed, or a negative value on error */
196 int (*master_xfer)(struct i2c_adapter *adap,struct i2c_msg *msgs, 198 int (*master_xfer)(struct i2c_adapter *adap,struct i2c_msg *msgs,
197 int num); 199 int num);
198 int (*smbus_xfer) (struct i2c_adapter *adap, u16 addr, 200 int (*smbus_xfer) (struct i2c_adapter *adap, u16 addr,