aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/dma/at_hdmac.c
diff options
context:
space:
mode:
authorRussell King - ARM Linux <linux@arm.linux.org.uk>2012-03-06 17:35:47 -0500
committerVinod Koul <vinod.koul@linux.intel.com>2012-03-13 02:07:22 -0400
commitd3ee98cdcd6198ea1cf75c603178acc8a805b69b (patch)
tree721f252d07d5e0596fa9b58a7c876dfd75823d0a /drivers/dma/at_hdmac.c
parent96a2af41c78b1fbb1f567a3486bdc63f7b31c5fd (diff)
dmaengine: consolidate initialization of cookies
Provide a common function to initialize a channels cookie values. 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/at_hdmac.c')
-rw-r--r--drivers/dma/at_hdmac.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/dma/at_hdmac.c b/drivers/dma/at_hdmac.c
index 8a3297418cf..5d225ddc769 100644
--- a/drivers/dma/at_hdmac.c
+++ b/drivers/dma/at_hdmac.c
@@ -1103,7 +1103,7 @@ static int atc_alloc_chan_resources(struct dma_chan *chan)
1103 spin_lock_irqsave(&atchan->lock, flags); 1103 spin_lock_irqsave(&atchan->lock, flags);
1104 atchan->descs_allocated = i; 1104 atchan->descs_allocated = i;
1105 list_splice(&tmp_list, &atchan->free_list); 1105 list_splice(&tmp_list, &atchan->free_list);
1106 chan->completed_cookie = chan->cookie = 1; 1106 dma_cookie_init(chan);
1107 spin_unlock_irqrestore(&atchan->lock, flags); 1107 spin_unlock_irqrestore(&atchan->lock, flags);
1108 1108
1109 /* channel parameters */ 1109 /* channel parameters */
@@ -1303,7 +1303,7 @@ static int __init at_dma_probe(struct platform_device *pdev)
1303 struct at_dma_chan *atchan = &atdma->chan[i]; 1303 struct at_dma_chan *atchan = &atdma->chan[i];
1304 1304
1305 atchan->chan_common.device = &atdma->dma_common; 1305 atchan->chan_common.device = &atdma->dma_common;
1306 atchan->chan_common.cookie = atchan->chan_common.completed_cookie = 1; 1306 dma_cookie_init(&atchan->chan_common);
1307 list_add_tail(&atchan->chan_common.device_node, 1307 list_add_tail(&atchan->chan_common.device_node,
1308 &atdma->dma_common.channels); 1308 &atdma->dma_common.channels);
1309 1309