Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
i2c-core: Comment says "transmitted" but means "received"
Fix that. Also convert this and the related comment to proper commenting
style.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
  • Loading branch information
Wolfram Sang authored and Jean Delvare committed Mar 15, 2012
1 parent f1cbd03 commit 834aa6f
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions drivers/i2c/i2c-core.c
Expand Up @@ -1386,8 +1386,10 @@ int i2c_master_send(const struct i2c_client *client, const char *buf, int count)

ret = i2c_transfer(adap, &msg, 1);

/* If everything went ok (i.e. 1 msg transmitted), return #bytes
transmitted, else error code. */
/*
* If everything went ok (i.e. 1 msg transmitted), return #bytes
* transmitted, else error code.
*/
return (ret == 1) ? count : ret;
}
EXPORT_SYMBOL(i2c_master_send);
Expand All @@ -1414,8 +1416,10 @@ int i2c_master_recv(const struct i2c_client *client, char *buf, int count)

ret = i2c_transfer(adap, &msg, 1);

/* If everything went ok (i.e. 1 msg transmitted), return #bytes
transmitted, else error code. */
/*
* If everything went ok (i.e. 1 msg received), return #bytes received,
* else error code.
*/
return (ret == 1) ? count : ret;
}
EXPORT_SYMBOL(i2c_master_recv);
Expand Down

0 comments on commit 834aa6f

Please sign in to comment.