]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/spi/dw_spi.c
Merge commit 'v2.6.39' into spi/next
[karo-tx-linux.git] / drivers / spi / dw_spi.c
index 855ac4ae0f22f21dc3c58896da8963984506d998..919fa9d9e16bab34fef8af03a5a6286ac9fad394 100644 (file)
@@ -305,7 +305,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 */
@@ -752,7 +752,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);