summaryrefslogtreecommitdiffstats
path: root/drivers/dma/dmaengine.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/dma/dmaengine.h')
-rw-r--r--drivers/dma/dmaengine.h10
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 @@
#include <linux/dmaengine.h>
/**
+ * dma_cookie_init - initialize the cookies for a DMA channel
+ * @chan: dma channel to initialize
+ */
+static inline void dma_cookie_init(struct dma_chan *chan)
+{
+ chan->cookie = DMA_MIN_COOKIE;
+ chan->completed_cookie = DMA_MIN_COOKIE;
+}
+
+/**
* dma_cookie_assign - assign a DMA engine cookie to the descriptor
* @tx: descriptor needing cookie
*
OpenPOWER on IntegriCloud