Vasily Khoruzhick 850a28ecd8 spi: Fix race condition in stop_queue()
There's a race condition in stop_queue() in some drivers -
if drv_data->queue is empty, but drv_data->busy is still set
(or opposite situation) stop_queue will return -EBUSY.
So fix loop condition to check that both drv_data->queue is empty
and drv_data->busy is not set.

This patch affects following drivers:
pxa2xx_spi
spi_bfin5xx
amba-pl022
dw_spi

Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Acked-by: Eric Miao <eric.y.miao@gmail.com>
Acked-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2011-04-07 11:17:45 -07:00
..
2007-02-14 08:09:53 -08:00
2011-02-22 14:59:53 -07:00
2011-02-22 14:59:54 -07:00
2010-12-25 15:32:27 +01:00
2011-02-03 09:55:43 -07:00
2011-03-15 08:17:22 -07:00