i2c: imx: Simplify stopped state tracking
authorEsben Haabendal <eha@deif.com>
Thu, 16 Aug 2018 08:43:13 +0000 (10:43 +0200)
committerWolfram Sang <wsa@the-dreams.de>
Mon, 20 Aug 2018 09:13:16 +0000 (11:13 +0200)
commitef456a2de3716e2a38382ff2aa9a9c52962e7e84
tree186d7f1f92fb209b3d799c3fb4f8ee769d26b106
parentbed4ff1ed4d8f2ef5007c5c6ae1b29c5677a3632
i2c: imx: Simplify stopped state tracking

Always update the stopped state when busy status have been checked.
This is identical to what was done before, with the exception of error
handling.
Without this change, some errors cause the stopped state to be left in
incorrect state in i2c_imx_stop(), i2c_imx_dma_read(), i2c_imx_read() and
i2c_imx_xfer().

Signed-off-by: Esben Haabendal <eha@deif.com>
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
drivers/i2c/busses/i2c-imx.c