Marek Vasut 41682e03d4 mxs/spi: Fix misuse of init_completion
The init_completion() call does reinit not only the variable carrying
the flag that the completion finished, but also initialized the
waitqueue associated with the completion. On the contrary, the
INIT_COMPLETION() call only reinits the flag.

In case there was anything still stuck in the waitqueue, subsequent call
to init_completion() would be able to create possible race condition. This
patch uses the proper function and moves init_completion() into .probe() call
of the driver, to be issued only once.

Note that such scenario is impossible, since two threads can never enter the
mxs_spi_txrx_dma(), since whole this section is protected by mutex in SPI core.
This by no means allows this issue to exit though.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Chris Ball <cjb@laptop.org>
Cc: Shawn Guo <shawn.guo@linaro.org>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-08-27 09:36:53 -07:00
..
2012-08-17 22:54:10 +01:00
2011-11-09 23:02:12 +08:00
2012-04-10 14:11:34 -06:00
2012-07-10 15:28:56 +01:00
2012-07-23 14:14:54 +01:00
2012-07-02 13:55:36 +02:00
2012-04-10 14:11:34 -06:00
2012-05-19 22:37:16 -06:00
2012-07-26 12:57:41 -07:00