Skip to content

Commit

Permalink
ARM: S3C64XX: DMA: Free node for non-circular queues
Browse files Browse the repository at this point in the history
We need to free the buff and lli nodes if the buffer queue is
not CIRCULAR.

Signed-off-by: Jassi Brar <jassi.brar@samsung.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
  • Loading branch information
Jassi Brar authored and Ben Dooks committed Nov 9, 2009
1 parent 9b08284 commit 336b1a3
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions arch/arm/plat-s3c64xx/dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 336b1a3

Please sign in to comment.