i2c-pca-algo: Fix error code
authorWolfram Sang <w.sang@pengutronix.de>
Mon, 14 Jul 2008 20:38:26 +0000 (22:38 +0200)
committerJean Delvare <khali@mahadeva.delvare>
Mon, 14 Jul 2008 20:38:26 +0000 (22:38 +0200)
Give a more concrete error code, when the bus is not idle.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
drivers/i2c/algos/i2c-algo-pca.c

index e954a20..d50b329 100644 (file)
@@ -182,7 +182,7 @@ static int pca_xfer(struct i2c_adapter *i2c_adap,
        }
        if (state != 0xf8) {
                dev_dbg(&i2c_adap->dev, "bus is not idle. status is %#04x\n", state);
-               return -EIO;
+               return -EAGAIN;
        }
 
        DEB1("{{{ XFER %d messages\n", num);