Commit 9ecb41bd authored by Rabin Vincent's avatar Rabin Vincent Committed by Vinod Koul

dmaengine: ste_dma40: fix pm runtime ref counting

The pm runtime reference counting of the driver is broken for the case
when there is more than one transfer queued, leading to the device being
runtime suspend while active.  Fix it.
Signed-off-by: default avatarRabin Vincent <rabin.vincent@stericsson.com>
Acked-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Cc: stable@vger.kernel.org
Signed-off-by: default avatarVinod Koul <vinod.koul@intel.com>
parent e4aa937e
...@@ -1566,10 +1566,12 @@ static void dma_tc_handle(struct d40_chan *d40c) ...@@ -1566,10 +1566,12 @@ static void dma_tc_handle(struct d40_chan *d40c)
return; return;
} }
if (d40_queue_start(d40c) == NULL) if (d40_queue_start(d40c) == NULL) {
d40c->busy = false; d40c->busy = false;
pm_runtime_mark_last_busy(d40c->base->dev); pm_runtime_mark_last_busy(d40c->base->dev);
pm_runtime_put_autosuspend(d40c->base->dev); pm_runtime_put_autosuspend(d40c->base->dev);
}
d40_desc_remove(d40d); d40_desc_remove(d40d);
d40_desc_done(d40c, d40d); d40_desc_done(d40c, d40d);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment