提交 3ac012af 编写于 作者: J Jonas Aaberg 提交者: Dan Williams

DMAENGINE: ste_dma40: don't pause/resume non-executing channels

There is no point in pausing what isn't running.
Signed-off-by: NJonas Aaberg <jonas.aberg@stericsson.com>
Signed-off-by: NLinus Walleij <linus.walleij@stericsson.com>
Signed-off-by: NDan Williams <dan.j.williams@intel.com>
上级 8f6fd7f5
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册