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:
Dan Williams
2010-03-26 16:52:10 -07:00
parent 0793448187
commit bca3469205
14 changed files with 27 additions and 88 deletions

View File

@@ -1651,11 +1651,7 @@ static enum dma_status idmac_tx_status(struct dma_chan *chan,
{
struct idmac_channel *ichan = to_idmac_chan(chan);
if (txstate) {
txstate->last = ichan->completed;
txstate->used = chan->cookie;
txstate->residue = 0;
}
dma_set_tx_state(txstate, ichan->completed, chan->cookie, 0);
if (cookie != chan->cookie)
return DMA_ERROR;
return DMA_SUCCESS;