diff options
Diffstat (limited to 'drivers/dma/timb_dma.c')
-rw-r--r-- | drivers/dma/timb_dma.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/dma/timb_dma.c b/drivers/dma/timb_dma.c index 145f1c23408f..7c06471ef863 100644 --- a/drivers/dma/timb_dma.c +++ b/drivers/dma/timb_dma.c | |||
@@ -613,7 +613,7 @@ static struct dma_async_tx_descriptor *td_prep_slave_sg(struct dma_chan *chan, | |||
613 | return &td_desc->txd; | 613 | return &td_desc->txd; |
614 | } | 614 | } |
615 | 615 | ||
616 | static void td_terminate_all(struct dma_chan *chan) | 616 | static int td_control(struct dma_chan *chan, enum dma_ctrl_cmd cmd) |
617 | { | 617 | { |
618 | struct timb_dma_chan *td_chan = | 618 | struct timb_dma_chan *td_chan = |
619 | container_of(chan, struct timb_dma_chan, chan); | 619 | container_of(chan, struct timb_dma_chan, chan); |
@@ -621,6 +621,9 @@ static void td_terminate_all(struct dma_chan *chan) | |||
621 | 621 | ||
622 | dev_dbg(chan2dev(chan), "%s: Entry\n", __func__); | 622 | dev_dbg(chan2dev(chan), "%s: Entry\n", __func__); |
623 | 623 | ||
624 | if (cmd != DMA_TERMINATE_ALL) | ||
625 | return -ENXIO; | ||
626 | |||
624 | /* first the easy part, put the queue into the free list */ | 627 | /* first the easy part, put the queue into the free list */ |
625 | spin_lock_bh(&td_chan->lock); | 628 | spin_lock_bh(&td_chan->lock); |
626 | list_for_each_entry_safe(td_desc, _td_desc, &td_chan->queue, | 629 | list_for_each_entry_safe(td_desc, _td_desc, &td_chan->queue, |
@@ -630,6 +633,8 @@ static void td_terminate_all(struct dma_chan *chan) | |||
630 | /* now tear down the runnning */ | 633 | /* now tear down the runnning */ |
631 | __td_finish(td_chan); | 634 | __td_finish(td_chan); |
632 | spin_unlock_bh(&td_chan->lock); | 635 | spin_unlock_bh(&td_chan->lock); |
636 | |||
637 | return 0; | ||
633 | } | 638 | } |
634 | 639 | ||
635 | static void td_tasklet(unsigned long data) | 640 | static void td_tasklet(unsigned long data) |
@@ -743,7 +748,7 @@ static int __devinit td_probe(struct platform_device *pdev) | |||
743 | dma_cap_set(DMA_SLAVE, td->dma.cap_mask); | 748 | dma_cap_set(DMA_SLAVE, td->dma.cap_mask); |
744 | dma_cap_set(DMA_PRIVATE, td->dma.cap_mask); | 749 | dma_cap_set(DMA_PRIVATE, td->dma.cap_mask); |
745 | td->dma.device_prep_slave_sg = td_prep_slave_sg; | 750 | td->dma.device_prep_slave_sg = td_prep_slave_sg; |
746 | td->dma.device_terminate_all = td_terminate_all; | 751 | td->dma.device_control = td_control; |
747 | 752 | ||
748 | td->dma.dev = &pdev->dev; | 753 | td->dma.dev = &pdev->dev; |
749 | 754 | ||