diff options
Diffstat (limited to 'drivers/spi/dw_spi.c')
-rw-r--r-- | drivers/spi/dw_spi.c | 4 |
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) | |||
345 | 345 | ||
346 | void dw_spi_xfer_done(struct dw_spi *dws) | 346 | void dw_spi_xfer_done(struct dw_spi *dws) |
347 | { | 347 | { |
348 | /* Update total byte transfered return count actual bytes read */ | 348 | /* Update total byte transferred return count actual bytes read */ |
349 | dws->cur_msg->actual_length += dws->len; | 349 | dws->cur_msg->actual_length += dws->len; |
350 | 350 | ||
351 | /* Move to next transfer */ | 351 | /* Move to next transfer */ |
@@ -821,7 +821,7 @@ static int stop_queue(struct dw_spi *dws) | |||
821 | 821 | ||
822 | spin_lock_irqsave(&dws->lock, flags); | 822 | spin_lock_irqsave(&dws->lock, flags); |
823 | dws->run = QUEUE_STOPPED; | 823 | dws->run = QUEUE_STOPPED; |
824 | while (!list_empty(&dws->queue) && dws->busy && limit--) { | 824 | while ((!list_empty(&dws->queue) || dws->busy) && limit--) { |
825 | spin_unlock_irqrestore(&dws->lock, flags); | 825 | spin_unlock_irqrestore(&dws->lock, flags); |
826 | msleep(10); | 826 | msleep(10); |
827 | spin_lock_irqsave(&dws->lock, flags); | 827 | spin_lock_irqsave(&dws->lock, flags); |