lkml.org 
[lkml]   [2010]   [Aug]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 13/14] DMAENGINE: ste_dma40: don't pause/resume non-executing channels
Date
From: Jonas Aaberg <jonas.aberg@stericsson.com>

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>
---
drivers/dma/ste_dma40.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/drivers/dma/ste_dma40.c b/drivers/dma/ste_dma40.c
index c9f485e..05d0a99 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)
--
1.6.3.3


\
 
 \ /
  Last update: 2010-08-09 14:13    [W:0.026 / U:0.340 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site