diff options
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/dmaengine.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h index 8fbf40e0713c..0d738c95fe4e 100644 --- a/include/linux/dmaengine.h +++ b/include/linux/dmaengine.h | |||
| @@ -24,6 +24,7 @@ | |||
| 24 | #include <linux/device.h> | 24 | #include <linux/device.h> |
| 25 | #include <linux/uio.h> | 25 | #include <linux/uio.h> |
| 26 | #include <linux/dma-direction.h> | 26 | #include <linux/dma-direction.h> |
| 27 | #include <linux/scatterlist.h> | ||
| 27 | 28 | ||
| 28 | struct scatterlist; | 29 | struct scatterlist; |
| 29 | 30 | ||
| @@ -519,6 +520,16 @@ static inline int dmaengine_slave_config(struct dma_chan *chan, | |||
| 519 | (unsigned long)config); | 520 | (unsigned long)config); |
| 520 | } | 521 | } |
| 521 | 522 | ||
| 523 | static inline struct dma_async_tx_descriptor *dmaengine_prep_slave_single( | ||
| 524 | struct dma_chan *chan, void *buf, size_t len, | ||
| 525 | enum dma_data_direction dir, unsigned long flags) | ||
| 526 | { | ||
| 527 | struct scatterlist sg; | ||
| 528 | sg_init_one(&sg, buf, len); | ||
| 529 | |||
| 530 | return chan->device->device_prep_slave_sg(chan, &sg, 1, dir, flags); | ||
| 531 | } | ||
| 532 | |||
| 522 | static inline int dmaengine_terminate_all(struct dma_chan *chan) | 533 | static inline int dmaengine_terminate_all(struct dma_chan *chan) |
| 523 | { | 534 | { |
| 524 | return dmaengine_device_control(chan, DMA_TERMINATE_ALL, 0); | 535 | return dmaengine_device_control(chan, DMA_TERMINATE_ALL, 0); |
