Skip to contentSkip to conversation

dma: rcar-dma: use result of updated get_residue in tx_status

PATCH RESEND In review [email protected] 1 participant 1 message Sep 20, 2015

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH RESEND 4/6 dma: rcar-dma: use result of updated get_residue in tx_status

From: Muhammad Hamza Farooq <[email protected]>

---
 drivers/dma/sh/rcar-dmac.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/dma/sh/rcar-dmac.c +4 -0
index 668fd2b..ce21575 100644
@@ -1258,6 +1258,10 @@ static enum dma_status rcar_dmac_tx_status(struct dma_chan *chan,
 	residue = rcar_dmac_chan_get_residue(rchan, cookie);
 	spin_unlock_irqrestore(&rchan->lock, flags);
 
+	/* if there's no residue, the cookie is complete */
+	if (!residue)
+		return DMA_COMPLETE;
+
 	dma_set_residue(txstate, residue);
 
 	return status;
Signature · 1 line
1.9.1