summaryrefslogtreecommitdiffstats
path: root/drivers
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
parenti2c: s3c2410: Trivial cleanup in header file (diff)
downloadlinux-4fda99627dc037d3b316c3b3250075645cfcbe4d.tar.xz
linux-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')
-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: