提交 d45e75b1 编写于 作者: T Troy Kisky 提交者: Heiko Schocher

mxc_i2c: remove redundant read

wait_for_sr_state returns i2sr on success
so no need to read again.
Signed-off-by: NTroy Kisky <troy.kisky@boundarydevices.com>
Acked-by: NMarek Vasut <marex@denx.de>
上级 7aa57a01
......@@ -195,7 +195,6 @@ static int tx_byte(struct mxc_i2c_regs *i2c_regs, u8 byte)
ret = wait_for_sr_state(i2c_regs, ST_IIF);
if (ret < 0)
return ret;
ret = readb(&i2c_regs->i2sr);
if (ret & I2SR_RX_NO_AK)
return -ENODEV;
return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册