diff options
author | Dan Williams <dan.j.williams@intel.com> | 2010-03-26 19:52:10 -0400 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2010-03-26 19:52:10 -0400 |
commit | bca3469205402d9fb14060d255d8786ae2256640 (patch) | |
tree | 3b0c7f246fb9a6eafd3a82dd621dd9753589b3f4 /drivers/dma/shdma.c | |
parent | 0793448187643b50af89d36b08470baf45a3cab4 (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 'drivers/dma/shdma.c')
-rw-r--r-- | drivers/dma/shdma.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/dma/shdma.c b/drivers/dma/shdma.c index 8aeda9ceb225..98f82cdb404c 100644 --- a/drivers/dma/shdma.c +++ b/drivers/dma/shdma.c | |||
@@ -752,12 +752,7 @@ static enum dma_status sh_dmae_tx_status(struct dma_chan *chan, | |||
752 | last_used = chan->cookie; | 752 | last_used = chan->cookie; |
753 | last_complete = sh_chan->completed_cookie; | 753 | last_complete = sh_chan->completed_cookie; |
754 | BUG_ON(last_complete < 0); | 754 | BUG_ON(last_complete < 0); |
755 | 755 | dma_set_tx_state(txstate, last_complete, last_used, 0); | |
756 | if (txstate) { | ||
757 | txstate->last = last_complete; | ||
758 | txstate->used = last_used; | ||
759 | txstate->residue = 0; | ||
760 | } | ||
761 | 756 | ||
762 | spin_lock_bh(&sh_chan->desc_lock); | 757 | spin_lock_bh(&sh_chan->desc_lock); |
763 | 758 | ||