aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/dma/pch_dma.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/pch_dma.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/pch_dma.c')
-rw-r--r--drivers/dma/pch_dma.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/dma/pch_dma.c b/drivers/dma/pch_dma.c
index c30f63ee32c5..c93bb0459972 100644
--- a/drivers/dma/pch_dma.c
+++ b/drivers/dma/pch_dma.c
@@ -531,7 +531,7 @@ static int pd_alloc_chan_resources(struct dma_chan *chan)
531 spin_lock_irq(&pd_chan->lock); 531 spin_lock_irq(&pd_chan->lock);
532 list_splice(&tmp_list, &pd_chan->free_list); 532 list_splice(&tmp_list, &pd_chan->free_list);
533 pd_chan->descs_allocated = i; 533 pd_chan->descs_allocated = i;
534 chan->completed_cookie = chan->cookie = 1; 534 dma_cookie_init(chan);
535 spin_unlock_irq(&pd_chan->lock); 535 spin_unlock_irq(&pd_chan->lock);
536 536
537 pdc_enable_irq(chan, 1); 537 pdc_enable_irq(chan, 1);
@@ -912,7 +912,7 @@ static int __devinit pch_dma_probe(struct pci_dev *pdev,
912 struct pch_dma_chan *pd_chan = &pd->channels[i]; 912 struct pch_dma_chan *pd_chan = &pd->channels[i];
913 913
914 pd_chan->chan.device = &pd->dma; 914 pd_chan->chan.device = &pd->dma;
915 pd_chan->chan.cookie = 1; 915 dma_cookie_init(&pd_chan->chan);
916 916
917 pd_chan->membase = &regs->desc[i]; 917 pd_chan->membase = &regs->desc[i];
918 918