dmaengine: qcom: bam_dma: fix runtime PM underflow
authorCaleb Connolly <caleb.connolly@linaro.org>
Wed, 29 Jun 2022 14:06:00 +0000 (15:06 +0100)
committerVinod Koul <vkoul@kernel.org>
Fri, 1 Jul 2022 11:03:36 +0000 (16:33 +0530)
commit0ac9c3dd0d6fe293cd5044cfad10bec27d171e4e
treef96be78d52dd78a68f8e2ed61d5a6fa3b0ebbc5d
parenta7cd3cf0b2e5aaacfe5e02c472bd28e98e640be7
dmaengine: qcom: bam_dma: fix runtime PM underflow

Commit dbad41e7bb5f ("dmaengine: qcom: bam_dma: check if the runtime pm enabled")
caused unbalanced pm_runtime_get/put() calls when the bam is
controlled remotely. This commit reverts it and just enables pm_runtime
in all cases, the clk_* functions already just nop when the clock is NULL.

Also clean up a bit by removing unnecessary bamclk null checks.

Suggested-by: Stephan Gerhold <stephan@gerhold.net>
Fixes: dbad41e7bb5f ("dmaengine: qcom: bam_dma: check if the runtime pm enabled")
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
Link: https://lore.kernel.org/r/20220629140559.118537-1-caleb.connolly@linaro.org
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/qcom/bam_dma.c