summaryrefslogtreecommitdiff
path: root/drivers/i2c
diff options
context:
space:
mode:
authorMaxime COQUELIN <maxime.coquelin@st.com>2014-02-28 13:52:56 +0100
committerWolfram Sang <wsa@the-dreams.de>2014-03-10 17:35:08 +0100
commit4fda99627dc037d3b316c3b3250075645cfcbe4d (patch)
tree470cf4319541d41a2300f8a2826f83eb1b2e2aee /drivers/i2c
parentcd5006db1b6b9128d1f5b0f1ad17cbced9d3841c (diff)
downloadlwn-4fda99627dc037d3b316c3b3250075645cfcbe4d.tar.gz
lwn-4fda99627dc037d3b316c3b3250075645cfcbe4d.zip
i2c: st: Fix return in case of arbitration lost
This patch fixes the error returned to the i2c_transfer function to -EAGAIN in case of arbitratin lost, so that the retry mechanism can be used. Signed-off-by: Maxime Coquelin <maxime.coquelin@st.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Diffstat (limited to 'drivers/i2c')
-rw-r--r--drivers/i2c/busses/i2c-st.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/i2c/busses/i2c-st.c b/drivers/i2c/busses/i2c-st.c
index 9cf715d69551..872016196ef3 100644
--- a/drivers/i2c/busses/i2c-st.c
+++ b/drivers/i2c/busses/i2c-st.c
@@ -574,7 +574,7 @@ static irqreturn_t st_i2c_isr_thread(int irq, void *data)
writel_relaxed(it, i2c_dev->base + SSC_IEN);
st_i2c_set_bits(i2c_dev->base + SSC_I2C, SSC_I2C_STOPG);
- c->result = -EIO;
+ c->result = -EAGAIN;
break;
default: