i2c: imx: Fix reinit_completion() use
authorEsben Haabendal <eha@deif.com>
Mon, 9 Jul 2018 09:43:01 +0000 (11:43 +0200)
committerWolfram Sang <wsa@the-dreams.de>
Mon, 23 Jul 2018 18:07:59 +0000 (20:07 +0200)
commit9f9e3e0d4dd3338b3f3dde080789f71901e1e4ff
tree73a61e3d5bddad1e591077ae7e590ef05912e1b2
parentcc8de9a68599b261244ea453b38678229f06ada7
i2c: imx: Fix reinit_completion() use

Make sure to call reinit_completion() before dma is started to avoid race
condition where reinit_completion() is called after complete() and before
wait_for_completion_timeout().

Signed-off-by: Esben Haabendal <eha@deif.com>
Fixes: ce1a78840ff7 ("i2c: imx: add DMA support for freescale i2c driver")
Reviewed-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Cc: stable@kernel.org
drivers/i2c/busses/i2c-imx.c