From: Vasily Khoruzhick Date: Wed, 6 Apr 2011 14:49:15 +0000 (+0300) Subject: spi: Fix race condition in stop_queue() X-Git-Tag: v2.6.39-rc3~4^2~1 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=850a28ecd8044ef36b2c7699d2e3736a410b4d0a;p=pandora-kernel.git 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 Acked-by: Eric Miao Acked-by: Mike Frysinger Signed-off-by: Grant Likely --- Reading git-diff-tree failed