summaryrefslogtreecommitdiffstats
path: root/drivers/i2c
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2019-02-25 15:00:41 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2019-02-27 08:53:20 +0100
commit8bba223a64fa1e314107350892b2bf2b8220b0e1 (patch)
tree984bb2faf4d85503e6f7c46cbb9be9f7a5082948 /drivers/i2c
parent9d9b87ef9c4bfbd56a49f1f0e7be212718d6d289 (diff)
downloadbarebox-8bba223a64fa1e314107350892b2bf2b8220b0e1.tar.gz
barebox-8bba223a64fa1e314107350892b2bf2b8220b0e1.tar.xz
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 <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/i2c')
-rw-r--r--drivers/i2c/busses/i2c-imx.c4
1 files changed, 0 insertions, 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;
}