summaryrefslogtreecommitdiff
path: root/drivers/dma/timb_dma.c
diff options
context:
space:
mode:
authorRussell King - ARM Linux <linux@arm.linux.org.uk>2012-03-06 22:35:47 +0000
committerSimone Willett <swillett@nvidia.com>2012-04-03 09:36:16 -0700
commitff27e02b2ca48beb0330473427fa8e0be64c15ab (patch)
tree368456e1e5e5001ea132e57a748defbfe9309775 /drivers/dma/timb_dma.c
parentb1ca7f8af4b3c86635fc523283c2bed9175aea14 (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/timb_dma.c')
-rw-r--r--drivers/dma/timb_dma.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/dma/timb_dma.c b/drivers/dma/timb_dma.c
index ad3396b52cbd..49e5b0234e81 100644
--- a/drivers/dma/timb_dma.c
+++ b/drivers/dma/timb_dma.c
@@ -477,8 +477,7 @@ static int td_alloc_chan_resources(struct dma_chan *chan)
}
spin_lock_bh(&td_chan->lock);
- chan->completed_cookie = 1;
- chan->cookie = 1;
+ dma_cookie_init(chan);
spin_unlock_bh(&td_chan->lock);
return 0;
@@ -755,8 +754,12 @@ static int __devinit td_probe(struct platform_device *pdev)
}
td_chan->chan.device = &td->dma;
+<<<<<<< HEAD
td_chan->chan.cookie = 1;
td_chan->chan.chan_id = i;
+=======
+ dma_cookie_init(&td_chan->chan);
+>>>>>>> d3ee98cdc... dmaengine: consolidate initialization of cookies
spin_lock_init(&td_chan->lock);
INIT_LIST_HEAD(&td_chan->active_list);
INIT_LIST_HEAD(&td_chan->queue);