summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2017-06-30 10:02:21 +0200
committerLee Jones <lee.jones@linaro.org>2017-09-05 09:45:59 +0200
commitff827cf5698b111b2e5f825cb9ee508115f94e8a (patch)
tree760d0dedeee533e779822772eb467edb5e71f09f
parentMerge branches 'ib-mfd-arm-i2c-4.14', 'ib-mfd-arm-usb-video-4.14', 'ib-mfd-hw... (diff)
downloadlinux-ff827cf5698b111b2e5f825cb9ee508115f94e8a.tar.xz
linux-ff827cf5698b111b2e5f825cb9ee508115f94e8a.zip
mfd: twl-core: Improve the documentation
Saying it "returns the result" seems tautological. The read function does not return num_bytes on success, it returns zero on success. I noticed this discrepancy because some of the callers were checking for >= 0. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
-rw-r--r--drivers/mfd/twl-core.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mfd/twl-core.c b/drivers/mfd/twl-core.c
index 2a09dde4ca6e..d3133a371e27 100644
--- a/drivers/mfd/twl-core.c
+++ b/drivers/mfd/twl-core.c
@@ -448,7 +448,7 @@ static struct regmap *twl_get_regmap(u8 mod_no)
* @reg: register address (just offset will do)
* @num_bytes: number of bytes to transfer
*
- * Returns the result of operation - 0 is success
+ * Returns 0 on success or else a negative error code.
*/
int twl_i2c_write(u8 mod_no, u8 *value, u8 reg, unsigned num_bytes)
{
@@ -476,7 +476,7 @@ EXPORT_SYMBOL(twl_i2c_write);
* @reg: register address (just offset will do)
* @num_bytes: number of bytes to transfer
*
- * Returns result of operation - num_bytes is success else failure.
+ * Returns 0 on success or else a negative error code.
*/
int twl_i2c_read(u8 mod_no, u8 *value, u8 reg, unsigned num_bytes)
{