mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
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 <[email protected]> Signed-off-by: Linus Walleij <[email protected]> Signed-off-by: Dan Williams <[email protected]>
This commit is contained in:
parent
8f6fd7f50f
commit
3ac012af3b
1 changed files with 6 additions and 0 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue