Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ff827cf5 authored by Dan Carpenter's avatar Dan Carpenter Committed by Lee Jones
Browse files

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: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
parent 3f979bf8
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -448,7 +448,7 @@ static struct regmap *twl_get_regmap(u8 mod_no)
 * @reg: register address (just offset will do)
 * @reg: register address (just offset will do)
 * @num_bytes: number of bytes to transfer
 * @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)
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)
 * @reg: register address (just offset will do)
 * @num_bytes: number of bytes to transfer
 * @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)
int twl_i2c_read(u8 mod_no, u8 *value, u8 reg, unsigned num_bytes)
{
{