]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
spi: spi-fsl-lpspi: Undo runtime PM changes at driver exit time
authorJinjie Ruan <ruanjinjie@huawei.com>
Fri, 6 Sep 2024 02:12:51 +0000 (10:12 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 4 Oct 2024 14:29:38 +0000 (16:29 +0200)
commit93773e4461978d30b8b90e4390e0fee2f397160b
tree5b203fda023ecc9109ff25a09a8643b88af287b6
parent2016d58567b698474c7c98da51651ac459a38a1a
spi: spi-fsl-lpspi: Undo runtime PM changes at driver exit time

[ Upstream commit 3b577de206d52dbde9428664b6d823d35a803d75 ]

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, call pm_runtime_dont_use_autosuspend() at driver exit time
to fix it.

Fixes: 944c01a889d9 ("spi: lpspi: enable runtime pm for lpspi")
Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com>
Link: https://patch.msgid.link/20240906021251.610462-1-ruanjinjie@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/spi/spi-fsl-lpspi.c