summaryrefslogtreecommitdiffstats
path: root/drivers/i2c
diff options
context:
space:
mode:
authorBen Dooks <ben.dooks@codethink.co.uk>2014-01-26 16:05:37 +0000
committerWolfram Sang <wsa@the-dreams.de>2014-01-26 22:48:36 +0100
commit6ff4b105163223741f5a82804f9695221017ae42 (patch)
tree6c2bceb80ff2753a149fbedece45aacbc30383a0 /drivers/i2c
parent25ee33fb824eb46ae77f6c962007492603d39772 (diff)
i2c: rcar: fix NACK error code
The response to a bus NACK is to return -ENXIO instead of the -EREMOTEIO being currently returned by the driver. Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Diffstat (limited to 'drivers/i2c')
-rw-r--r--drivers/i2c/busses/i2c-rcar.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/i2c/busses/i2c-rcar.c b/drivers/i2c/busses/i2c-rcar.c
index 57169d23aa3..0282d4d4280 100644
--- a/drivers/i2c/busses/i2c-rcar.c
+++ b/drivers/i2c/busses/i2c-rcar.c
@@ -598,7 +598,7 @@ static int rcar_i2c_master_xfer(struct i2c_adapter *adap,
* error handling
*/
if (rcar_i2c_flags_has(priv, ID_NACK)) {
- ret = -EREMOTEIO;
+ ret = -ENXIO;
break;
}
@@ -617,7 +617,7 @@ static int rcar_i2c_master_xfer(struct i2c_adapter *adap,
pm_runtime_put(dev);
- if (ret < 0 && ret != -EREMOTEIO)
+ if (ret < 0 && ret != -ENXIO)
dev_err(dev, "error %d : %x\n", ret, priv->flags);
return ret;