Skip to content

Commit

Permalink
V4L/DVB: cx23885: Return -ENXIO on slave nack
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jean Delvare authored and Mauro Carvalho Chehab committed Aug 9, 2010
1 parent 3d217c8 commit f4acb3c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/media/video/cx23885/cx23885-i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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__);
Expand Down

0 comments on commit f4acb3c

Please sign in to comment.