mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-25 18:30:06 +00:00
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>
This commit is contained in:
parent
42f36457f9
commit
bc0757a51c
1 changed files with 4 additions and 4 deletions
|
@ -84,7 +84,7 @@ static int usb_xfer(struct i2c_adapter *adapter, struct i2c_msg *msgs, int num)
|
||||||
pmsg->buf, pmsg->len) != pmsg->len) {
|
pmsg->buf, pmsg->len) != pmsg->len) {
|
||||||
dev_err(&adapter->dev,
|
dev_err(&adapter->dev,
|
||||||
"failure reading data\n");
|
"failure reading data\n");
|
||||||
ret = -EREMOTEIO;
|
ret = -EIO;
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
} else {
|
} 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) {
|
pmsg->buf, pmsg->len) != pmsg->len) {
|
||||||
dev_err(&adapter->dev,
|
dev_err(&adapter->dev,
|
||||||
"failure writing data\n");
|
"failure writing data\n");
|
||||||
ret = -EREMOTEIO;
|
ret = -EIO;
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -102,13 +102,13 @@ static int usb_xfer(struct i2c_adapter *adapter, struct i2c_msg *msgs, int num)
|
||||||
/* read status */
|
/* read status */
|
||||||
if (usb_read(adapter, CMD_GET_STATUS, 0, 0, pstatus, 1) != 1) {
|
if (usb_read(adapter, CMD_GET_STATUS, 0, 0, pstatus, 1) != 1) {
|
||||||
dev_err(&adapter->dev, "failure reading status\n");
|
dev_err(&adapter->dev, "failure reading status\n");
|
||||||
ret = -EREMOTEIO;
|
ret = -EIO;
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
dev_dbg(&adapter->dev, " status = %d\n", *pstatus);
|
dev_dbg(&adapter->dev, " status = %d\n", *pstatus);
|
||||||
if (*pstatus == STATUS_ADDRESS_NAK) {
|
if (*pstatus == STATUS_ADDRESS_NAK) {
|
||||||
ret = -EREMOTEIO;
|
ret = -ENXIO;
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue