summaryrefslogtreecommitdiff
path: root/drivers/spi
diff options
context:
space:
mode:
authorGrzegorz Sygieda <grzegorz.sygieda@tieto.com>2010-05-20 22:28:30 +0000
committerGrant Likely <grant.likely@secretlab.ca>2010-05-25 00:23:14 -0600
commit4a12404ddaa06e8ec5e2c0d8ece4d821281e6024 (patch)
tree934a15de476cc21fd245bcf97eb78fc07c7b39a1 /drivers/spi
parent781c7b129b1beb876905f7212927aa0ee1b022e5 (diff)
downloadlinux-next-4a12404ddaa06e8ec5e2c0d8ece4d821281e6024.tar.gz
spi/pl022: fix stop queue procedure
This fix prevents queue being marked as "stopped", if data exists in the queue list. Signed-off-by: Grzegorz Sygieda <grzegorz.sygieda@tieto.com> Signed-off-by: Lukasz Baj <lukasz.baj@tieto.com> Signed-off-by: Linus Walleij <linus.walleij@stericsson.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Diffstat (limited to 'drivers/spi')
-rw-r--r--drivers/spi/amba-pl022.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/spi/amba-pl022.c b/drivers/spi/amba-pl022.c
index c75831c1deda..f0a1418ce660 100644
--- a/drivers/spi/amba-pl022.c
+++ b/drivers/spi/amba-pl022.c
@@ -1211,7 +1211,6 @@ static int stop_queue(struct pl022 *pl022)
* A wait_queue on the pl022->busy could be used, but then the common
* execution path (pump_messages) would be required to call wake_up or
* friends on every SPI message. Do this instead */
- pl022->run = QUEUE_STOPPED;
while (!list_empty(&pl022->queue) && pl022->busy && limit--) {
spin_unlock_irqrestore(&pl022->queue_lock, flags);
msleep(10);
@@ -1220,6 +1219,7 @@ static int stop_queue(struct pl022 *pl022)
if (!list_empty(&pl022->queue) || pl022->busy)
status = -EBUSY;
+ else pl022->run = QUEUE_STOPPED;
spin_unlock_irqrestore(&pl022->queue_lock, flags);