]> www.infradead.org Git - users/jedix/linux-maple.git/commit
spi: geni-qcom: Undo runtime PM changes at driver exit time
authorJinjie Ruan <ruanjinjie@huawei.com>
Mon, 9 Sep 2024 07:31:39 +0000 (15:31 +0800)
committerMark Brown <broonie@kernel.org>
Mon, 9 Sep 2024 11:57:32 +0000 (12:57 +0100)
commit89e362c883c65ff94b76b9862285f63545fb5274
treead45cc0a92320627664edb803bee34378f60236a
parentc9ca76e8239810ccb08825a7b847c39d367410a6
spi: geni-qcom: Undo runtime PM changes at driver exit time

It's important to undo pm_runtime_use_autosuspend() with
pm_runtime_dont_use_autosuspend() at driver exit time unless driver
initially enabled pm_runtime with devm_pm_runtime_enable()
(which handles it for you).

Hence, switch to devm_pm_runtime_enable() to fix it, so the
pm_runtime_disable() in probe error path and remove function
can be removed.

Fixes: cfdab2cd85ec ("spi: spi-geni-qcom: Set an autosuspend delay of 250 ms")
Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com>
Suggested-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://patch.msgid.link/20240909073141.951494-2-ruanjinjie@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-geni-qcom.c