Skip to content

Commit 99b2014

Browse files
Sakari Ailusvinodkoul
authored andcommitted
dmaengine: at_xdmac: Use pm_runtime_put_noidle() with many usage_counts
We're holding more than one Runtime PM usage_counts in at_xdmac_device_terminate_all(). This makes pm_runtime_mark_last_busy() redundant and pm_runtime_put_autosuspend() misleading. Drop pm_runtime_mark_last_busy() and use pm_runtime_put_noidle() to decrement the usage_count, except in the case it may be the last. Signed-off-by: Sakari Ailus <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
1 parent 862f3c4 commit 99b2014

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

drivers/dma/at_xdmac.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2033,10 +2033,8 @@ static int at_xdmac_device_terminate_all(struct dma_chan *chan)
20332033
* at_xdmac_start_xfer() for this descriptor. Now it's time
20342034
* to release it.
20352035
*/
2036-
if (desc->active_xfer) {
2037-
pm_runtime_put_autosuspend(atxdmac->dev);
2038-
pm_runtime_mark_last_busy(atxdmac->dev);
2039-
}
2036+
if (desc->active_xfer)
2037+
pm_runtime_put_noidle(atxdmac->dev);
20402038
}
20412039

20422040
clear_bit(AT_XDMAC_CHAN_IS_PAUSED, &atchan->status);

0 commit comments

Comments
 (0)