Skip to content

Commit

Permalink
dmaengine: ste_dma40: fix pm runtime ref counting
Browse files Browse the repository at this point in the history
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: Rabin Vincent <[email protected]>
Acked-by: Linus Walleij <[email protected]>
Cc: [email protected]
Signed-off-by: Vinod Koul <[email protected]>
  • Loading branch information
vitkyrka authored and Vinod Koul committed May 27, 2013
1 parent e4aa937 commit 9ecb41b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions drivers/dma/ste_dma40.c
Original file line number Diff line number Diff line change
Expand Up @@ -1566,10 +1566,12 @@ static void dma_tc_handle(struct d40_chan *d40c)
return;
}

if (d40_queue_start(d40c) == NULL)
if (d40_queue_start(d40c) == NULL) {
d40c->busy = false;
pm_runtime_mark_last_busy(d40c->base->dev);
pm_runtime_put_autosuspend(d40c->base->dev);

pm_runtime_mark_last_busy(d40c->base->dev);
pm_runtime_put_autosuspend(d40c->base->dev);
}

d40_desc_remove(d40d);
d40_desc_done(d40c, d40d);
Expand Down

0 comments on commit 9ecb41b

Please sign in to comment.