]> git.sur5r.net Git - u-boot/commitdiff
mxc_i2c: remove redundant read
authorTroy Kisky <troy.kisky@boundarydevices.com>
Thu, 19 Jul 2012 08:18:10 +0000 (08:18 +0000)
committerHeiko Schocher <hs@denx.de>
Tue, 31 Jul 2012 05:45:00 +0000 (07:45 +0200)
wait_for_sr_state returns i2sr on success
so no need to read again.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
Acked-by: Marek Vasut <marex@denx.de>
drivers/i2c/mxc_i2c.c

index 01a64081d7e8e342eddc4c5e9d9b3c15708aede3..83c2fab0897a5fda5e89d4d9d535694cf6c54ed1 100644 (file)
@@ -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;