diff options
author | Christoph Müllner <christoph.muellner@theobroma-systems.com> | 2019-12-12 01:12:50 +0100 |
---|---|---|
committer | Wolfram Sang <wsa@the-dreams.de> | 2020-01-06 15:40:43 +0100 |
commit | bc0757a51c5a3ef4e76ba6d22310a6e49bc4d0e0 (patch) | |
tree | 0bb0a24fd079327163dca5b9d0471c878108bd9c /drivers/i2c | |
parent | i2c: at91: remote default value initialization (diff) | |
download | linux-bc0757a51c5a3ef4e76ba6d22310a6e49bc4d0e0.tar.xz linux-bc0757a51c5a3ef4e76ba6d22310a6e49bc4d0e0.zip |
i2c: tiny-usb: Correct I2C fault codes.
This patch changes the I2C fault codes according to the specified
values in Documentation/i2c/fault-codes.
Signed-off-by: Christoph Müllner <christoph.muellner@theobroma-systems.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Diffstat (limited to 'drivers/i2c')
-rw-r--r-- | drivers/i2c/busses/i2c-tiny-usb.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/i2c/busses/i2c-tiny-usb.c b/drivers/i2c/busses/i2c-tiny-usb.c index 43e3603489ee..7279ca0eaa2d 100644 --- a/drivers/i2c/busses/i2c-tiny-usb.c +++ b/drivers/i2c/busses/i2c-tiny-usb.c @@ -84,7 +84,7 @@ static int usb_xfer(struct i2c_adapter *adapter, struct i2c_msg *msgs, int num) pmsg->buf, pmsg->len) != pmsg->len) { dev_err(&adapter->dev, "failure reading data\n"); - ret = -EREMOTEIO; + ret = -EIO; goto out; } } else { @@ -94,7 +94,7 @@ static int usb_xfer(struct i2c_adapter *adapter, struct i2c_msg *msgs, int num) pmsg->buf, pmsg->len) != pmsg->len) { dev_err(&adapter->dev, "failure writing data\n"); - ret = -EREMOTEIO; + ret = -EIO; goto out; } } @@ -102,13 +102,13 @@ static int usb_xfer(struct i2c_adapter *adapter, struct i2c_msg *msgs, int num) /* read status */ if (usb_read(adapter, CMD_GET_STATUS, 0, 0, pstatus, 1) != 1) { dev_err(&adapter->dev, "failure reading status\n"); - ret = -EREMOTEIO; + ret = -EIO; goto out; } dev_dbg(&adapter->dev, " status = %d\n", *pstatus); if (*pstatus == STATUS_ADDRESS_NAK) { - ret = -EREMOTEIO; + ret = -ENXIO; goto out; } } |