mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
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>
This commit is contained in:
parent
0793448187
commit
bca3469205
14 changed files with 27 additions and 88 deletions
|
@ -628,6 +628,16 @@ static inline enum dma_status dma_async_is_complete(dma_cookie_t cookie,
|
|||
return DMA_IN_PROGRESS;
|
||||
}
|
||||
|
||||
static inline void
|
||||
dma_set_tx_state(struct dma_tx_state *st, dma_cookie_t last, dma_cookie_t used, u32 residue)
|
||||
{
|
||||
if (st) {
|
||||
st->last = last;
|
||||
st->used = used;
|
||||
st->residue = residue;
|
||||
}
|
||||
}
|
||||
|
||||
enum dma_status dma_sync_wait(struct dma_chan *chan, dma_cookie_t cookie);
|
||||
#ifdef CONFIG_DMA_ENGINE
|
||||
enum dma_status dma_wait_for_async_tx(struct dma_async_tx_descriptor *tx);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue