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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 12 Jul 2022 14:35:18 +0000 (16:35 +0200)
commit2f6ded79068cac8cff41d5d5632564165d98ee12
tree8ebe78f75c14b07c857be6e8d99886c79cd905f2
parentcb9813d7eae917acd34436160a278b8b5d48ca53
dmaengine: qcom: bam_dma: fix runtime PM underflow

commit 0ac9c3dd0d6fe293cd5044cfad10bec27d171e4e upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/dma/qcom/bam_dma.c