diff options
author | Maxime Ripard <maxime.ripard@free-electrons.com> | 2015-01-13 15:16:22 -0500 |
---|---|---|
committer | Vinod Koul <vinod.koul@intel.com> | 2015-01-18 09:31:15 -0500 |
commit | a0a51a64f6a3e718e6d461f11d72d9ce41c706d6 (patch) | |
tree | cfa68b6bdfa13e9fa346a369102710bab2ea6364 | |
parent | 0d5484b1c3db8a3870c6100deeb4678594433b2c (diff) |
dmaengine: sa11x0: Fix warning and compilation errors
The sa11x0_dma_resume conflicts between the dmaengine device_resume callback
and the dev_pm_ops resume implementation.
Also remove some unused variables at the same time.
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
-rw-r--r-- | drivers/dma/sa11x0-dma.c | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/drivers/dma/sa11x0-dma.c b/drivers/dma/sa11x0-dma.c index e229c62d7bad..5adf5407a8cb 100644 --- a/drivers/dma/sa11x0-dma.c +++ b/drivers/dma/sa11x0-dma.c | |||
@@ -669,8 +669,8 @@ static struct dma_async_tx_descriptor *sa11x0_dma_prep_dma_cyclic( | |||
669 | return vchan_tx_prep(&c->vc, &txd->vd, DMA_PREP_INTERRUPT | DMA_CTRL_ACK); | 669 | return vchan_tx_prep(&c->vc, &txd->vd, DMA_PREP_INTERRUPT | DMA_CTRL_ACK); |
670 | } | 670 | } |
671 | 671 | ||
672 | static int sa11x0_dma_slave_config(struct dma_chan *chan, | 672 | static int sa11x0_dma_device_config(struct dma_chan *chan, |
673 | struct dma_slave_config *cfg) | 673 | struct dma_slave_config *cfg) |
674 | { | 674 | { |
675 | struct sa11x0_dma_chan *c = to_sa11x0_dma_chan(chan); | 675 | struct sa11x0_dma_chan *c = to_sa11x0_dma_chan(chan); |
676 | u32 ddar = c->ddar & ((0xf << 4) | DDAR_RW); | 676 | u32 ddar = c->ddar & ((0xf << 4) | DDAR_RW); |
@@ -706,14 +706,13 @@ static int sa11x0_dma_slave_config(struct dma_chan *chan, | |||
706 | return 0; | 706 | return 0; |
707 | } | 707 | } |
708 | 708 | ||
709 | static int sa11x0_dma_pause(struct dma_chan *chan) | 709 | static int sa11x0_dma_device_pause(struct dma_chan *chan) |
710 | { | 710 | { |
711 | struct sa11x0_dma_chan *c = to_sa11x0_dma_chan(chan); | 711 | struct sa11x0_dma_chan *c = to_sa11x0_dma_chan(chan); |
712 | struct sa11x0_dma_dev *d = to_sa11x0_dma(chan->device); | 712 | struct sa11x0_dma_dev *d = to_sa11x0_dma(chan->device); |
713 | struct sa11x0_dma_phy *p; | 713 | struct sa11x0_dma_phy *p; |
714 | LIST_HEAD(head); | 714 | LIST_HEAD(head); |
715 | unsigned long flags; | 715 | unsigned long flags; |
716 | int ret; | ||
717 | 716 | ||
718 | dev_dbg(d->slave.dev, "vchan %p: pause\n", &c->vc); | 717 | dev_dbg(d->slave.dev, "vchan %p: pause\n", &c->vc); |
719 | spin_lock_irqsave(&c->vc.lock, flags); | 718 | spin_lock_irqsave(&c->vc.lock, flags); |
@@ -734,14 +733,13 @@ static int sa11x0_dma_pause(struct dma_chan *chan) | |||
734 | return 0; | 733 | return 0; |
735 | } | 734 | } |
736 | 735 | ||
737 | static int sa11x0_dma_resume(struct dma_chan *chan) | 736 | static int sa11x0_dma_device_resume(struct dma_chan *chan) |
738 | { | 737 | { |
739 | struct sa11x0_dma_chan *c = to_sa11x0_dma_chan(chan); | 738 | struct sa11x0_dma_chan *c = to_sa11x0_dma_chan(chan); |
740 | struct sa11x0_dma_dev *d = to_sa11x0_dma(chan->device); | 739 | struct sa11x0_dma_dev *d = to_sa11x0_dma(chan->device); |
741 | struct sa11x0_dma_phy *p; | 740 | struct sa11x0_dma_phy *p; |
742 | LIST_HEAD(head); | 741 | LIST_HEAD(head); |
743 | unsigned long flags; | 742 | unsigned long flags; |
744 | int ret; | ||
745 | 743 | ||
746 | dev_dbg(d->slave.dev, "vchan %p: resume\n", &c->vc); | 744 | dev_dbg(d->slave.dev, "vchan %p: resume\n", &c->vc); |
747 | spin_lock_irqsave(&c->vc.lock, flags); | 745 | spin_lock_irqsave(&c->vc.lock, flags); |
@@ -762,14 +760,13 @@ static int sa11x0_dma_resume(struct dma_chan *chan) | |||
762 | return 0; | 760 | return 0; |
763 | } | 761 | } |
764 | 762 | ||
765 | static int sa11x0_dma_terminate_all(struct dma_chan *chan) | 763 | static int sa11x0_dma_device_terminate_all(struct dma_chan *chan) |
766 | { | 764 | { |
767 | struct sa11x0_dma_chan *c = to_sa11x0_dma_chan(chan); | 765 | struct sa11x0_dma_chan *c = to_sa11x0_dma_chan(chan); |
768 | struct sa11x0_dma_dev *d = to_sa11x0_dma(chan->device); | 766 | struct sa11x0_dma_dev *d = to_sa11x0_dma(chan->device); |
769 | struct sa11x0_dma_phy *p; | 767 | struct sa11x0_dma_phy *p; |
770 | LIST_HEAD(head); | 768 | LIST_HEAD(head); |
771 | unsigned long flags; | 769 | unsigned long flags; |
772 | int ret; | ||
773 | 770 | ||
774 | dev_dbg(d->slave.dev, "vchan %p: terminate all\n", &c->vc); | 771 | dev_dbg(d->slave.dev, "vchan %p: terminate all\n", &c->vc); |
775 | /* Clear the tx descriptor lists */ | 772 | /* Clear the tx descriptor lists */ |
@@ -840,10 +837,10 @@ static int sa11x0_dma_init_dmadev(struct dma_device *dmadev, | |||
840 | dmadev->dev = dev; | 837 | dmadev->dev = dev; |
841 | dmadev->device_alloc_chan_resources = sa11x0_dma_alloc_chan_resources; | 838 | dmadev->device_alloc_chan_resources = sa11x0_dma_alloc_chan_resources; |
842 | dmadev->device_free_chan_resources = sa11x0_dma_free_chan_resources; | 839 | dmadev->device_free_chan_resources = sa11x0_dma_free_chan_resources; |
843 | dmadev->device_config = sa11x0_dma_slave_config; | 840 | dmadev->device_config = sa11x0_dma_device_config; |
844 | dmadev->device_pause = sa11x0_dma_pause; | 841 | dmadev->device_pause = sa11x0_dma_device_pause; |
845 | dmadev->device_resume = sa11x0_dma_resume; | 842 | dmadev->device_resume = sa11x0_dma_device_resume; |
846 | dmadev->device_terminate_all = sa11x0_dma_terminate_all; | 843 | dmadev->device_terminate_all = sa11x0_dma_device_terminate_all; |
847 | dmadev->device_tx_status = sa11x0_dma_tx_status; | 844 | dmadev->device_tx_status = sa11x0_dma_tx_status; |
848 | dmadev->device_issue_pending = sa11x0_dma_issue_pending; | 845 | dmadev->device_issue_pending = sa11x0_dma_issue_pending; |
849 | 846 | ||