On Thu, Aug 09, 2012 at 08:47:20AM -0700, Guenter Roeck wrote: > The master_xfer function returns 0 on success. It should return the number of > successful transactions. > > Signed-off-by: Guenter Roeck <linux@xxxxxxxxxxxx> Applied to -current, thanks! To add something to the discussion, an excerpt for i2c-core.c: 1357 int i2c_transfer(struct i2c_adapter *adap, struct i2c_msg *msgs, int num) 1358 { 1359 int ret; 1360 1361 /* REVISIT the fault reporting model here is weak: 1362 * 1363 * - When we get an error after receiving N bytes from a slave, 1364 * there is no way to report "N". 1365 * 1366 * - When we get a NAK after transmitting N bytes to a slave, 1367 * there is no way to report "N" ... or to let the master 1368 * continue executing the rest of this combined message, if 1369 * that's the appropriate response. 1370 * 1371 * - When for example "num" is two and we successfully complete 1372 * the first message but get an error part way through the 1373 * second, it's unclear whether that should be reported as 1374 * one (discarding status on the second message) or errno 1375 * (discarding status on the first one). 1376 */ 1377 -- Pengutronix e.K. | Wolfram Sang | Industrial Linux Solutions | http://www.pengutronix.de/ |
Attachment:
signature.asc
Description: Digital signature