]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
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 e954a20b97a647e1b5766d345117cab121a42811..d50b329a3c94f079a78c6f2c85bff7b2271d2ae0 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);