Ver Fonte

i2c-pca-algo: Fix error code

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>
Wolfram Sang há 17 anos atrás
pai
commit
c80ebe7987
1 ficheiros alterados com 1 adições e 1 exclusões
  1. 1 1
      drivers/i2c/algos/i2c-algo-pca.c

+ 1 - 1
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);