From 05219e8f0629f7a02acc3b0b3feed80944459d23 Mon Sep 17 00:00:00 2001 From: Javier Martin Date: Thu, 22 Mar 2012 14:54:09 +0100 Subject: [PATCH] --- yaml --- r: 297540 b: refs/heads/master c: 6b0e2f55e3ebc7089abf5e4770f03fb264b6d2ea h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/dma/imx-dma.c | 11 +++-------- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/[refs] b/[refs] index 4b5b4c380664..89112f4e65e0 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: e4756b5e068d866239b6880a7030c9d31400b254 +refs/heads/master: 6b0e2f55e3ebc7089abf5e4770f03fb264b6d2ea diff --git a/trunk/drivers/dma/imx-dma.c b/trunk/drivers/dma/imx-dma.c index d7309e44c0df..6e03f928ca81 100644 --- a/trunk/drivers/dma/imx-dma.c +++ b/trunk/drivers/dma/imx-dma.c @@ -129,8 +129,6 @@ enum imxdma_prep_type { */ struct imxdma_channel_internal { - unsigned int resbytes; - struct timer_list watchdog; int hw_chaining; @@ -233,12 +231,11 @@ static int imxdma_hw_chain(struct imxdma_channel_internal *imxdma) static inline int imxdma_sg_next(struct imxdma_desc *d, struct scatterlist *sg) { struct imxdma_channel *imxdmac = to_imxdma_chan(d->desc.chan); - struct imxdma_channel_internal *imxdma = &imxdmac->internal; unsigned long now; - now = min(imxdma->resbytes, sg->length); - if (imxdma->resbytes != IMX_DMA_LENGTH_LOOP) - imxdma->resbytes -= now; + now = min(d->len, sg->length); + if (d->len != IMX_DMA_LENGTH_LOOP) + d->len -= now; if (d->direction == DMA_DEV_TO_MEM) imx_dmav1_writel(sg->dma_address, DMA_DAR(imxdmac->channel)); @@ -480,8 +477,6 @@ static int imxdma_xfer_desc(struct imxdma_desc *d) /* Cyclic transfer is the same as slave_sg with special sg configuration. */ case IMXDMA_DESC_CYCLIC: case IMXDMA_DESC_SLAVE_SG: - imxdmac->internal.resbytes = d->len; - if (d->direction == DMA_DEV_TO_MEM) { imx_dmav1_writel(imxdmac->per_address, DMA_SAR(imxdmac->channel));