summaryrefslogtreecommitdiffstats
path: root/drivers/dma
diff options
context:
space:
mode:
authorJonas Aaberg <jonas.aberg@stericsson.com>2010-08-09 12:09:12 +0000
committerDan Williams <dan.j.williams@intel.com>2010-09-22 14:53:47 -0700
commit3ac012af3b1b3a6b373f3a9f19c5362974856c2c (patch)
tree6f71960819e88c98a4d61a0f52ad3dc9d9957385 /drivers/dma
parent8f6fd7f50f7059e5725a36885af52e54b9df96b2 (diff)
downloadlinux-3ac012af3b1b3a6b373f3a9f19c5362974856c2c.tar.bz2
DMAENGINE: ste_dma40: don't pause/resume non-executing channels
There is no point in pausing what isn't running. Signed-off-by: Jonas Aaberg <jonas.aberg@stericsson.com> Signed-off-by: Linus Walleij <linus.walleij@stericsson.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/dma')
-rw-r--r--drivers/dma/ste_dma40.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/dma/ste_dma40.c b/drivers/dma/ste_dma40.c
index c9f485e3baeb..05d0a9937617 100644
--- a/drivers/dma/ste_dma40.c
+++ b/drivers/dma/ste_dma40.c
@@ -768,6 +768,9 @@ static int d40_pause(struct dma_chan *chan)
int res = 0;
unsigned long flags;
+ if (!d40c->busy)
+ return 0;
+
spin_lock_irqsave(&d40c->lock, flags);
res = d40_channel_execute_command(d40c, D40_DMA_SUSPEND_REQ);
@@ -792,6 +795,9 @@ static int d40_resume(struct dma_chan *chan)
int res = 0;
unsigned long flags;
+ if (!d40c->busy)
+ return 0;
+
spin_lock_irqsave(&d40c->lock, flags);
if (d40c->base->rev == 0)