summaryrefslogtreecommitdiff
path: root/drivers/spi/dw_spi.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/spi/dw_spi.c')
-rw-r--r--drivers/spi/dw_spi.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/spi/dw_spi.c b/drivers/spi/dw_spi.c
index 9a6196461b27..871e337c917f 100644
--- a/drivers/spi/dw_spi.c
+++ b/drivers/spi/dw_spi.c
@@ -345,7 +345,7 @@ static void int_error_stop(struct dw_spi *dws, const char *msg)
void dw_spi_xfer_done(struct dw_spi *dws)
{
- /* Update total byte transfered return count actual bytes read */
+ /* Update total byte transferred return count actual bytes read */
dws->cur_msg->actual_length += dws->len;
/* Move to next transfer */
@@ -821,7 +821,7 @@ static int stop_queue(struct dw_spi *dws)
spin_lock_irqsave(&dws->lock, flags);
dws->run = QUEUE_STOPPED;
- while (!list_empty(&dws->queue) && dws->busy && limit--) {
+ while ((!list_empty(&dws->queue) || dws->busy) && limit--) {
spin_unlock_irqrestore(&dws->lock, flags);
msleep(10);
spin_lock_irqsave(&dws->lock, flags);