diff mbox

[1/2] i2c: mux: Use __i2c_transfer() instead of calling parent's master_xfer()

Message ID 557AD345.7090806@nokia.com
State Accepted
Headers show

Commit Message

Alexander A Sverdlin June 12, 2015, 12:40 p.m. UTC
Newly introduced quirks infrastructure doesn't work for the devices behind
MUXes because MUX's master_xfer() calls parent's master_xfer() directly
without checking the quirks. Instead of duplicating check code in MUX just
call __i2c_transfer() instead. This has a side effect on tracing (messages
will appear on both MUX bus and parent bus), but maybe that's not bad at
the end.

Signed-off-by: Alexander Sverdlin <alexander.sverdlin@nokia.com>
Tested-by: Łukasz Gemborowski <lukasz.gemborowski@nokia.com>
---
 drivers/i2c/i2c-mux.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Wolfram Sang June 17, 2015, 12:36 p.m. UTC | #1
On Fri, Jun 12, 2015 at 02:40:37PM +0200, Alexander Sverdlin wrote:
> Newly introduced quirks infrastructure doesn't work for the devices behind
> MUXes because MUX's master_xfer() calls parent's master_xfer() directly
> without checking the quirks. Instead of duplicating check code in MUX just
> call __i2c_transfer() instead. This has a side effect on tracing (messages
> will appear on both MUX bus and parent bus), but maybe that's not bad at
> the end.
> 
> Signed-off-by: Alexander Sverdlin <alexander.sverdlin@nokia.com>
> Tested-by: Łukasz Gemborowski <lukasz.gemborowski@nokia.com>

Applied to for-next with stable added, thanks!
diff mbox

Patch

diff --git a/drivers/i2c/i2c-mux.c b/drivers/i2c/i2c-mux.c
index 06cc1ff..98dd5d4 100644
--- a/drivers/i2c/i2c-mux.c
+++ b/drivers/i2c/i2c-mux.c
@@ -51,7 +51,7 @@  static int i2c_mux_master_xfer(struct i2c_adapter *adap,

 	ret = priv->select(parent, priv->mux_priv, priv->chan_id);
 	if (ret >= 0)
-		ret = parent->algo->master_xfer(parent, msgs, num);
+		ret = __i2c_transfer(parent, msgs, num);
 	if (priv->deselect)
 		priv->deselect(parent, priv->mux_priv, priv->chan_id);