[PATCH 1/5] i2c: i.MX: Do not call i2c_fsl_bus_busy twice

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxx>
---
 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;
 	}
-- 
2.20.1


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux