summaryrefslogtreecommitdiffstats
path: root/drivers/i2c
diff options
context:
space:
mode:
authorFabio Estevam <fabio.estevam@freescale.com>2015-10-22 14:41:20 -0200
committerWolfram Sang <wsa@the-dreams.de>2015-10-23 22:25:33 +0200
commit4c0657ae432398f729c1d402bab935505a5255b5 (patch)
treefdc8d550fbd56abe2d4db819e4e3e5122a5a0449 /drivers/i2c
parentdd77f423e516293c37c2370b44fd700900409c48 (diff)
downloadop-kernel-dev-4c0657ae432398f729c1d402bab935505a5255b5.zip
op-kernel-dev-4c0657ae432398f729c1d402bab935505a5255b5.tar.gz
i2c: imx: Use -ENXIO as error in the NACK case
According to Documentation/i2c/fault-codes the response to a bus NACK should be -ENXIO, so fix the error code. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Diffstat (limited to 'drivers/i2c')
-rw-r--r--drivers/i2c/busses/i2c-imx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/busses/i2c-imx.c
index 8d46e74..1e4d99d 100644
--- a/drivers/i2c/busses/i2c-imx.c
+++ b/drivers/i2c/busses/i2c-imx.c
@@ -467,7 +467,7 @@ static int i2c_imx_acked(struct imx_i2c_struct *i2c_imx)
{
if (imx_i2c_read_reg(i2c_imx, IMX_I2C_I2SR) & I2SR_RXAK) {
dev_dbg(&i2c_imx->adapter.dev, "<%s> No ACK\n", __func__);
- return -EIO; /* No ACK */
+ return -ENXIO; /* No ACK */
}
dev_dbg(&i2c_imx->adapter.dev, "<%s> ACK received\n", __func__);
OpenPOWER on IntegriCloud