V4L/DVB: cx23885: Return -ENXIO on slave nack
authorJean Delvare <khali@linux-fr.org>
Sun, 18 Jul 2010 19:48:47 +0000 (16:48 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Mon, 9 Aug 2010 02:42:53 +0000 (23:42 -0300)
Documentation/i2c/fault-codes says that i2c adapter drivers should
return -ENXIO when no slave acks an address byte.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Andy Walls <awalls@md.metrocast.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/cx23885/cx23885-i2c.c

index d4746e06451692f8c853bf8c73924c87f6ad70b3..154c914ae16fe29197503c9fe00787dd589fab31 100644 (file)
@@ -99,7 +99,7 @@ static int i2c_sendbytes(struct i2c_adapter *i2c_adap,
                if (!i2c_wait_done(i2c_adap))
                        return -EIO;
                if (!i2c_slave_did_ack(i2c_adap))
-                       return -EIO;
+                       return -ENXIO;
 
                dprintk(1, "%s() returns 0\n", __func__);
                return 0;
@@ -185,7 +185,7 @@ static int i2c_readbytes(struct i2c_adapter *i2c_adap,
                if (!i2c_wait_done(i2c_adap))
                        return -EIO;
                if (!i2c_slave_did_ack(i2c_adap))
-                       return -EIO;
+                       return -ENXIO;
 
 
                dprintk(1, "%s() returns 0\n", __func__);