aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2010-03-26 19:52:10 -0400
committerDan Williams <dan.j.williams@intel.com>2010-03-26 19:52:10 -0400
commitbca3469205402d9fb14060d255d8786ae2256640 (patch)
tree3b0c7f246fb9a6eafd3a82dd621dd9753589b3f4 /include/linux
parent0793448187643b50af89d36b08470baf45a3cab4 (diff)
dmaengine: provide helper for setting txstate
Simple conditional struct filler to cut out some duplicated code. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/dmaengine.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h
index 55b08e84ac8d..50b7b3e0d572 100644
--- a/include/linux/dmaengine.h
+++ b/include/linux/dmaengine.h
@@ -628,6 +628,16 @@ static inline enum dma_status dma_async_is_complete(dma_cookie_t cookie,
628 return DMA_IN_PROGRESS; 628 return DMA_IN_PROGRESS;
629} 629}
630 630
631static inline void
632dma_set_tx_state(struct dma_tx_state *st, dma_cookie_t last, dma_cookie_t used, u32 residue)
633{
634 if (st) {
635 st->last = last;
636 st->used = used;
637 st->residue = residue;
638 }
639}
640
631enum dma_status dma_sync_wait(struct dma_chan *chan, dma_cookie_t cookie); 641enum dma_status dma_sync_wait(struct dma_chan *chan, dma_cookie_t cookie);
632#ifdef CONFIG_DMA_ENGINE 642#ifdef CONFIG_DMA_ENGINE
633enum dma_status dma_wait_for_async_tx(struct dma_async_tx_descriptor *tx); 643enum dma_status dma_wait_for_async_tx(struct dma_async_tx_descriptor *tx);