i2c: exynos5: use proper errno for timeout
authorWolfram Sang <wsa@the-dreams.de>
Fri, 3 Oct 2014 11:57:14 +0000 (13:57 +0200)
committerWolfram Sang <wsa@the-dreams.de>
Mon, 10 Nov 2014 08:34:59 +0000 (09:34 +0100)
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
drivers/i2c/busses/i2c-exynos5.c

index 81e6263cd7daeed6ecc51c3a2b21881b3916fa3c..271533d564ecf3170cd41723073b5d5d54810596 100644 (file)
@@ -457,7 +457,7 @@ static irqreturn_t exynos5_i2c_irq(int irqno, void *dev_id)
                        goto stop;
                } else if (int_status & HSI2C_INT_TIMEOUT) {
                        dev_dbg(i2c->dev, "Accessing device timed out\n");
-                       i2c->state = -EAGAIN;
+                       i2c->state = -ETIMEDOUT;
                        goto stop;
                }
        } else if (int_status & HSI2C_INT_I2C) {
@@ -476,7 +476,7 @@ static irqreturn_t exynos5_i2c_irq(int irqno, void *dev_id)
                        goto stop;
                } else if (trans_status & HSI2C_TIMEOUT_AUTO) {
                        dev_dbg(i2c->dev, "Accessing device timed out\n");
-                       i2c->state = -EAGAIN;
+                       i2c->state = -ETIMEDOUT;
                        goto stop;
                } else if (trans_status & HSI2C_TRANS_DONE) {
                        i2c->trans_done = 1;