diff options
author | Russell King - ARM Linux <linux@arm.linux.org.uk> | 2012-03-06 17:35:47 -0500 |
---|---|---|
committer | Vinod Koul <vinod.koul@linux.intel.com> | 2012-03-13 02:07:22 -0400 |
commit | d3ee98cdcd6198ea1cf75c603178acc8a805b69b (patch) | |
tree | 721f252d07d5e0596fa9b58a7c876dfd75823d0a /drivers/dma/dmaengine.h | |
parent | 96a2af41c78b1fbb1f567a3486bdc63f7b31c5fd (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/dmaengine.h')
-rw-r--r-- | drivers/dma/dmaengine.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/dma/dmaengine.h b/drivers/dma/dmaengine.h index 1ca5e0e633f4..17f983a4e9ba 100644 --- a/drivers/dma/dmaengine.h +++ b/drivers/dma/dmaengine.h | |||
@@ -9,6 +9,16 @@ | |||
9 | #include <linux/dmaengine.h> | 9 | #include <linux/dmaengine.h> |
10 | 10 | ||
11 | /** | 11 | /** |
12 | * dma_cookie_init - initialize the cookies for a DMA channel | ||
13 | * @chan: dma channel to initialize | ||
14 | */ | ||
15 | static inline void dma_cookie_init(struct dma_chan *chan) | ||
16 | { | ||
17 | chan->cookie = DMA_MIN_COOKIE; | ||
18 | chan->completed_cookie = DMA_MIN_COOKIE; | ||
19 | } | ||
20 | |||
21 | /** | ||
12 | * dma_cookie_assign - assign a DMA engine cookie to the descriptor | 22 | * dma_cookie_assign - assign a DMA engine cookie to the descriptor |
13 | * @tx: descriptor needing cookie | 23 | * @tx: descriptor needing cookie |
14 | * | 24 | * |