diff options
author | Russell King - ARM Linux <linux@arm.linux.org.uk> | 2012-03-06 22:35:47 +0000 |
---|---|---|
committer | Simone Willett <swillett@nvidia.com> | 2012-04-03 09:36:16 -0700 |
commit | ff27e02b2ca48beb0330473427fa8e0be64c15ab (patch) | |
tree | 368456e1e5e5001ea132e57a748defbfe9309775 /drivers/dma/pch_dma.c | |
parent | b1ca7f8af4b3c86635fc523283c2bed9175aea14 (diff) |
dmaengine: consolidate initialization of cookies
Provide a common function to initialize a channels cookie values.
Change-Id: Idc822d69971d7a6d26ffea8809df4825b87020e5
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>
(cherry picked from mainline commit
d3ee98cdcd6198ea1cf75c603178acc8a805b69b)
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Change-Id: Id7d52f05b78d15b0c61cb04122b19810e78b9269
Reviewed-on: http://git-master/r/93783
Diffstat (limited to 'drivers/dma/pch_dma.c')
-rw-r--r-- | drivers/dma/pch_dma.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/dma/pch_dma.c b/drivers/dma/pch_dma.c index 5a346976ee23..4762f458e6d3 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) spin_lock_irq(&pd_chan->lock); list_splice(&tmp_list, &pd_chan->free_list); pd_chan->descs_allocated = i; - chan->completed_cookie = chan->cookie = 1; + dma_cookie_init(chan); spin_unlock_irq(&pd_chan->lock); pdc_enable_irq(chan, 1); @@ -914,8 +914,12 @@ static int __devinit pch_dma_probe(struct pci_dev *pdev, struct pch_dma_chan *pd_chan = &pd->channels[i]; pd_chan->chan.device = &pd->dma; +<<<<<<< HEAD pd_chan->chan.cookie = 1; pd_chan->chan.chan_id = i; +======= + dma_cookie_init(&pd_chan->chan); +>>>>>>> d3ee98cdc... dmaengine: consolidate initialization of cookies pd_chan->membase = ®s->desc[i]; |