Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <sakari.ailus@linux.intel.com>
Link: https://lore.kernel.org/r/20250410065804.3676582-1-sakari.ailus@linux.intel.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>

authored by

Sakari Ailus and committed by
Vinod Koul
99b20148 862f3c49

+2 -4
+2 -4
drivers/dma/at_xdmac.c
··· 2033 2033 * at_xdmac_start_xfer() for this descriptor. Now it's time 2034 2034 * to release it. 2035 2035 */ 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); 2040 2038 } 2041 2039 2042 2040 clear_bit(AT_XDMAC_CHAN_IS_PAUSED, &atchan->status);