Merge branch 'next-samsung-devel' into next-samsung-devel-2
[deliverable/linux.git] / include / linux / dmaengine.h
index 8fbf40e0713cfc9a4dd7ec64bc66010a42afc644..ace51af4369f668ea647f47c2d87f76d4478b121 100644 (file)
@@ -24,8 +24,7 @@
 #include <linux/device.h>
 #include <linux/uio.h>
 #include <linux/dma-direction.h>
-
-struct scatterlist;
+#include <linux/scatterlist.h>
 
 /**
  * typedef dma_cookie_t - an opaque DMA cookie
@@ -519,6 +518,16 @@ static inline int dmaengine_slave_config(struct dma_chan *chan,
                        (unsigned long)config);
 }
 
+static inline struct dma_async_tx_descriptor *dmaengine_prep_slave_single(
+       struct dma_chan *chan, void *buf, size_t len,
+       enum dma_data_direction dir, unsigned long flags)
+{
+       struct scatterlist sg;
+       sg_init_one(&sg, buf, len);
+
+       return chan->device->device_prep_slave_sg(chan, &sg, 1, dir, flags);
+}
+
 static inline int dmaengine_terminate_all(struct dma_chan *chan)
 {
        return dmaengine_device_control(chan, DMA_TERMINATE_ALL, 0);
This page took 0.032613 seconds and 5 git commands to generate.