[3.16.y-ckt stable] Patch "i2c: rk3x: report number of messages transmitted" has been added to staging queue

Luis Henriques luis.henriques at canonical.com
Wed May 6 09:52:37 UTC 2015


This is a note to let you know that I have just added a patch titled

    i2c: rk3x: report number of messages transmitted

to the linux-3.16.y-queue branch of the 3.16.y-ckt extended stable tree 
which can be found at:

    http://kernel.ubuntu.com/git/ubuntu/linux.git/log/?h=linux-3.16.y-queue

This patch is scheduled to be released in version 3.16.7-ckt11.

If you, or anyone else, feels it should not be added to this tree, please 
reply to this email.

For more information about the 3.16.y-ckt tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable

Thanks.
-Luis

------

>From a7c25c7048899f3df8ca670968ebb19ab1bc2070 Mon Sep 17 00:00:00 2001
From: Dmitry Torokhov <dmitry.torokhov at gmail.com>
Date: Mon, 20 Apr 2015 15:14:47 -0700
Subject: i2c: rk3x: report number of messages transmitted

commit c6cbfb91b878224e78408a2e15901c79de77115a upstream.

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 at gmail.com>
Signed-off-by: Wolfram Sang <wsa at the-dreams.de>
Signed-off-by: Luis Henriques <luis.henriques at canonical.com>
---
 drivers/i2c/busses/i2c-rk3x.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/i2c/busses/i2c-rk3x.c b/drivers/i2c/busses/i2c-rk3x.c
index b38b0529946a..f8e9a8b06d88 100644
--- a/drivers/i2c/busses/i2c-rk3x.c
+++ b/drivers/i2c/busses/i2c-rk3x.c
@@ -588,7 +588,7 @@ static int rk3x_i2c_xfer(struct i2c_adapter *adap,
 	clk_disable(i2c->clk);
 	spin_unlock_irqrestore(&i2c->lock, flags);

-	return ret;
+	return ret < 0 ? ret : num;
 }

 static u32 rk3x_i2c_func(struct i2c_adapter *adap)




More information about the kernel-team mailing list