From d3ee98cdcd6198ea1cf75c603178acc8a805b69b Mon Sep 17 00:00:00 2001 From: Russell King - ARM Linux Date: Tue, 6 Mar 2012 22:35:47 +0000 Subject: dmaengine: consolidate initialization of cookies Provide a common function to initialize a channels cookie values. Signed-off-by: Russell King Tested-by: Linus Walleij Reviewed-by: Linus Walleij Acked-by: Jassi Brar [imx-sdma.c & mxs-dma.c] Tested-by: Shawn Guo Signed-off-by: Vinod Koul --- drivers/dma/sirf-dma.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'drivers/dma/sirf-dma.c') diff --git a/drivers/dma/sirf-dma.c b/drivers/dma/sirf-dma.c index a760d981ece0..a2cde8585239 100644 --- a/drivers/dma/sirf-dma.c +++ b/drivers/dma/sirf-dma.c @@ -625,8 +625,7 @@ static int __devinit sirfsoc_dma_probe(struct platform_device *op) schan = &sdma->channels[i]; schan->chan.device = dma; - schan->chan.cookie = 1; - schan->chan.completed_cookie = schan->chan.cookie; + dma_cookie_init(&schan->chan); INIT_LIST_HEAD(&schan->free); INIT_LIST_HEAD(&schan->prepared); -- cgit v1.2.3