From: Wolfram Sang Date: Mon, 14 Jul 2008 20:38:26 +0000 (+0200) Subject: i2c-pca-algo: Fix error code X-Git-Tag: v2.6.27-rc1~1077^2~35 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c80ebe7987931ec4e80abc33ebf8aa2dad0d3763;p=linux-2.6 i2c-pca-algo: Fix error code Give a more concrete error code, when the bus is not idle. Signed-off-by: Wolfram Sang Signed-off-by: Jean Delvare --- diff --git a/drivers/i2c/algos/i2c-algo-pca.c b/drivers/i2c/algos/i2c-algo-pca.c index e954a20b97..d50b329a3c 100644 --- a/drivers/i2c/algos/i2c-algo-pca.c +++ b/drivers/i2c/algos/i2c-algo-pca.c @@ -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);