aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/i2c/busses
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2015-04-20 18:14:47 -0400
committerWolfram Sang <wsa@the-dreams.de>2015-04-23 13:35:28 -0400
commitc6cbfb91b878224e78408a2e15901c79de77115a (patch)
treec0371611dfcf9e4c990782fdbe6092c07a5596d9 /drivers/i2c/busses
parent27cf3a16b2535a490f8cf1d29a6634f1c70f7831 (diff)
i2c: rk3x: report number of messages transmitted
master_xfer() method should return number of i2c messages transferred, but on Rockchip we were usually returning just 1, which caused trouble with users that actually check number of transferred messages vs. checking for negative error codes. Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de> Cc: stable@kernel.org
Diffstat (limited to 'drivers/i2c/busses')
-rw-r--r--drivers/i2c/busses/i2c-rk3x.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/i2c/busses/i2c-rk3x.c b/drivers/i2c/busses/i2c-rk3x.c
index 5f96b1b3e3a5..019d5426fe52 100644
--- a/drivers/i2c/busses/i2c-rk3x.c
+++ b/drivers/i2c/busses/i2c-rk3x.c
@@ -833,7 +833,7 @@ static int rk3x_i2c_xfer(struct i2c_adapter *adap,
833 clk_disable(i2c->clk); 833 clk_disable(i2c->clk);
834 spin_unlock_irqrestore(&i2c->lock, flags); 834 spin_unlock_irqrestore(&i2c->lock, flags);
835 835
836 return ret; 836 return ret < 0 ? ret : num;
837} 837}
838 838
839static u32 rk3x_i2c_func(struct i2c_adapter *adap) 839static u32 rk3x_i2c_func(struct i2c_adapter *adap)