[U-Boot] [PATCH 08/24] mxc_i2c: remove redundant read
Marek Vasut
marex at denx.de
Fri Jun 22 19:02:43 CEST 2012
Dear Troy Kisky,
> wait_for_sr_state returns i2sr on success
> so no need to read again.
>
> Signed-off-by: Troy Kisky <troy.kisky at boundarydevices.com>
Acked-by: Marek Vasut <marex at denx.de>
> ---
> drivers/i2c/mxc_i2c.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/i2c/mxc_i2c.c b/drivers/i2c/mxc_i2c.c
> index 7b1b75c..9063d1e 100644
> --- a/drivers/i2c/mxc_i2c.c
> +++ b/drivers/i2c/mxc_i2c.c
> @@ -193,7 +193,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;
Best regards,
Marek Vasut
More information about the U-Boot
mailing list