From 8bba223a64fa1e314107350892b2bf2b8220b0e1 Mon Sep 17 00:00:00 2001 From: Sascha Hauer Date: Mon, 25 Feb 2019 15:00:41 +0100 Subject: i2c: i.MX: Do not call i2c_fsl_bus_busy twice In i2c_fsl_stop() we call i2c_fsl_bus_busy() a second time when it fails. If it fails once it won't succeed the second time, so drop the second call. Signed-off-by: Sascha Hauer --- drivers/i2c/busses/i2c-imx.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/busses/i2c-imx.c index 67937da73a..72d9fe5845 100644 --- a/drivers/i2c/busses/i2c-imx.c +++ b/drivers/i2c/busses/i2c-imx.c @@ -342,10 +342,6 @@ static void i2c_fsl_stop(struct i2c_adapter *adapter) fsl_i2c_write_reg(temp, i2c_fsl, FSL_I2C_I2CR); /* wait for the stop condition to be send, otherwise the i2c * controller is disabled before the STOP is sent completely */ - i2c_fsl->stopped = i2c_fsl_bus_busy(adapter, 0) ? 0 : 1; - } - - if (!i2c_fsl->stopped) { i2c_fsl_bus_busy(adapter, 0); i2c_fsl->stopped = 1; } -- cgit v1.2.3