From: Jassi Brar Date: Thu, 5 Nov 2009 04:44:39 +0000 (+0900) Subject: ARM: S3C64XX: DMA: Free node for non-circular queues X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=336b1a3181d81db85c0af3d0c18fe0a04b4d5126;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git ARM: S3C64XX: DMA: Free node for non-circular queues We need to free the buff and lli nodes if the buffer queue is not CIRCULAR. Signed-off-by: Jassi Brar Signed-off-by: Ben Dooks --- diff --git a/arch/arm/plat-s3c64xx/dma.c b/arch/arm/plat-s3c64xx/dma.c index 7d12eb8fa58d..d554b936fcfb 100644 --- a/arch/arm/plat-s3c64xx/dma.c +++ b/arch/arm/plat-s3c64xx/dma.c @@ -610,6 +610,12 @@ static irqreturn_t s3c64xx_dma_irq(int irq, void *pw) s3c64xx_dma_bufffdone(chan, buff, res); + /* Free the node and update curr, if non-circular queue */ + if (!(chan->flags & S3C2410_DMAF_CIRCULAR)) { + chan->curr = buff->next; + s3c64xx_dma_freebuff(buff); + } + /* Update 'next' */ buff = chan->next; if (chan->next == chan->end) {