dw_dmac: Calling dwc_scan_descriptors from dwc_tx_status() after taking lock
[pandora-kernel.git] / drivers / dma / dw_dmac.c
index 942b50f..2b0d5e9 100644 (file)
@@ -836,7 +836,9 @@ dwc_tx_status(struct dma_chan *chan,
 
        ret = dma_async_is_complete(cookie, last_complete, last_used);
        if (ret != DMA_SUCCESS) {
+               spin_lock_bh(&dwc->lock);
                dwc_scan_descriptors(to_dw_dma(chan->device), dwc);
+               spin_unlock_bh(&dwc->lock);
 
                last_complete = dwc->completed;
                last_used = chan->cookie;