diff options
author | Bill Richardson <wfrichar@chromium.org> | 2014-06-18 11:14:06 -0700 |
---|---|---|
committer | Lee Jones <lee.jones@linaro.org> | 2014-07-09 14:58:20 +0100 |
commit | 12ebc8a50bc54e3a6fe207861fc6793181f9c2dc (patch) | |
tree | 2375f0509badbfb00479cdc58d19a332aa9158b4 /drivers/mfd/cros_ec_i2c.c | |
parent | 6db07b6336589ff480528173e41f8f6af3f0097f (diff) | |
download | linux-12ebc8a50bc54e3a6fe207861fc6793181f9c2dc.tar.gz linux-12ebc8a50bc54e3a6fe207861fc6793181f9c2dc.tar.bz2 linux-12ebc8a50bc54e3a6fe207861fc6793181f9c2dc.zip |
mfd: cros_ec: ec_dev->cmd_xfer() returns number of bytes received from EC
When communicating with the EC, the cmd_xfer() function should return the
number of bytes it received from the EC, or negative on error.
Signed-off-by: Bill Richardson <wfrichar@chromium.org>
Signed-off-by: Doug Anderson <dianders@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Acked-by: Wolfram Sang <wsa@the-dreams.de>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Diffstat (limited to 'drivers/mfd/cros_ec_i2c.c')
-rw-r--r-- | drivers/mfd/cros_ec_i2c.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mfd/cros_ec_i2c.c b/drivers/mfd/cros_ec_i2c.c index 189e7d1d7742..fd7a546d3478 100644 --- a/drivers/mfd/cros_ec_i2c.c +++ b/drivers/mfd/cros_ec_i2c.c @@ -111,7 +111,7 @@ static int cros_ec_cmd_xfer_i2c(struct cros_ec_device *ec_dev, goto done; } - ret = 0; + ret = i2c_msg[1].buf[1]; done: kfree(in_buf); kfree(out_buf); |