diff options
Diffstat (limited to 'drivers/dma/shdma.c')
-rw-r--r-- | drivers/dma/shdma.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/drivers/dma/shdma.c b/drivers/dma/shdma.c index ce28c1e22825..8aeda9ceb225 100644 --- a/drivers/dma/shdma.c +++ b/drivers/dma/shdma.c | |||
@@ -738,10 +738,9 @@ static void sh_dmae_memcpy_issue_pending(struct dma_chan *chan) | |||
738 | sh_chan_xfer_ld_queue(sh_chan); | 738 | sh_chan_xfer_ld_queue(sh_chan); |
739 | } | 739 | } |
740 | 740 | ||
741 | static enum dma_status sh_dmae_is_complete(struct dma_chan *chan, | 741 | static enum dma_status sh_dmae_tx_status(struct dma_chan *chan, |
742 | dma_cookie_t cookie, | 742 | dma_cookie_t cookie, |
743 | dma_cookie_t *done, | 743 | struct dma_tx_state *txstate) |
744 | dma_cookie_t *used) | ||
745 | { | 744 | { |
746 | struct sh_dmae_chan *sh_chan = to_sh_chan(chan); | 745 | struct sh_dmae_chan *sh_chan = to_sh_chan(chan); |
747 | dma_cookie_t last_used; | 746 | dma_cookie_t last_used; |
@@ -754,11 +753,11 @@ static enum dma_status sh_dmae_is_complete(struct dma_chan *chan, | |||
754 | last_complete = sh_chan->completed_cookie; | 753 | last_complete = sh_chan->completed_cookie; |
755 | BUG_ON(last_complete < 0); | 754 | BUG_ON(last_complete < 0); |
756 | 755 | ||
757 | if (done) | 756 | if (txstate) { |
758 | *done = last_complete; | 757 | txstate->last = last_complete; |
759 | 758 | txstate->used = last_used; | |
760 | if (used) | 759 | txstate->residue = 0; |
761 | *used = last_used; | 760 | } |
762 | 761 | ||
763 | spin_lock_bh(&sh_chan->desc_lock); | 762 | spin_lock_bh(&sh_chan->desc_lock); |
764 | 763 | ||
@@ -1030,7 +1029,7 @@ static int __init sh_dmae_probe(struct platform_device *pdev) | |||
1030 | = sh_dmae_alloc_chan_resources; | 1029 | = sh_dmae_alloc_chan_resources; |
1031 | shdev->common.device_free_chan_resources = sh_dmae_free_chan_resources; | 1030 | shdev->common.device_free_chan_resources = sh_dmae_free_chan_resources; |
1032 | shdev->common.device_prep_dma_memcpy = sh_dmae_prep_memcpy; | 1031 | shdev->common.device_prep_dma_memcpy = sh_dmae_prep_memcpy; |
1033 | shdev->common.device_is_tx_complete = sh_dmae_is_complete; | 1032 | shdev->common.device_tx_status = sh_dmae_tx_status; |
1034 | shdev->common.device_issue_pending = sh_dmae_memcpy_issue_pending; | 1033 | shdev->common.device_issue_pending = sh_dmae_memcpy_issue_pending; |
1035 | 1034 | ||
1036 | /* Compulsory for DMA_SLAVE fields */ | 1035 | /* Compulsory for DMA_SLAVE fields */ |