aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/dma/mv_xor.c
diff options
context:
space:
mode:
authorRussell King - ARM Linux <linux@arm.linux.org.uk>2012-03-06 17:34:06 -0500
committerVinod Koul <vinod.koul@linux.intel.com>2012-03-13 02:06:06 -0400
commit4d4e58de32a192fea65ab84509d17d199bd291c8 (patch)
treebe35531778c9cc6bee73beb94d07e176a6f3599d /drivers/dma/mv_xor.c
parent08714f60b0fc6ea3a060b69b32e77139f14e6045 (diff)
dmaengine: move last completed cookie into generic dma_chan structure
Every DMA engine implementation declares a last completed dma cookie in their private dma channel structures. This is pointless, and forces driver specific code. Move this out into the common dma_chan structure. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Tested-by: Linus Walleij <linus.walleij@linaro.org> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: Jassi Brar <jassisinghbrar@gmail.com> [imx-sdma.c & mxs-dma.c] Tested-by: Shawn Guo <shawn.guo@linaro.org> Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
Diffstat (limited to 'drivers/dma/mv_xor.c')
-rw-r--r--drivers/dma/mv_xor.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/dma/mv_xor.c b/drivers/dma/mv_xor.c
index ad7d03fe4cb4..c6a84dac112c 100644
--- a/drivers/dma/mv_xor.c
+++ b/drivers/dma/mv_xor.c
@@ -435,7 +435,7 @@ static void __mv_xor_slot_cleanup(struct mv_xor_chan *mv_chan)
435 } 435 }
436 436
437 if (cookie > 0) 437 if (cookie > 0)
438 mv_chan->completed_cookie = cookie; 438 mv_chan->common.completed_cookie = cookie;
439} 439}
440 440
441static void 441static void
@@ -825,7 +825,7 @@ static enum dma_status mv_xor_status(struct dma_chan *chan,
825 enum dma_status ret; 825 enum dma_status ret;
826 826
827 last_used = chan->cookie; 827 last_used = chan->cookie;
828 last_complete = mv_chan->completed_cookie; 828 last_complete = chan->completed_cookie;
829 dma_set_tx_state(txstate, last_complete, last_used, 0); 829 dma_set_tx_state(txstate, last_complete, last_used, 0);
830 830
831 ret = dma_async_is_complete(cookie, last_complete, last_used); 831 ret = dma_async_is_complete(cookie, last_complete, last_used);
@@ -836,7 +836,7 @@ static enum dma_status mv_xor_status(struct dma_chan *chan,
836 mv_xor_slot_cleanup(mv_chan); 836 mv_xor_slot_cleanup(mv_chan);
837 837
838 last_used = chan->cookie; 838 last_used = chan->cookie;
839 last_complete = mv_chan->completed_cookie; 839 last_complete = chan->completed_cookie;
840 840
841 dma_set_tx_state(txstate, last_complete, last_used, 0); 841 dma_set_tx_state(txstate, last_complete, last_used, 0);
842 return dma_async_is_complete(cookie, last_complete, last_used); 842 return dma_async_is_complete(cookie, last_complete, last_used);