]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
spi: atmel-quadspi: Undo runtime PM changes at driver exit time
authorJinjie Ruan <ruanjinjie@huawei.com>
Fri, 6 Sep 2024 02:39:56 +0000 (10:39 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 4 Oct 2024 14:29:38 +0000 (16:29 +0200)
commit2016d58567b698474c7c98da51651ac459a38a1a
tree73893fad29bbd353d92590f27eef26111ec9ab79
parent649ec8b30df113042588bd3d3cd4e98bcb1091e0
spi: atmel-quadspi: Undo runtime PM changes at driver exit time

[ Upstream commit 438efb23f9581659495b85f1f6c7d5946200660c ]

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: 4a2f83b7f780 ("spi: atmel-quadspi: add runtime pm support")
Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com>
Link: https://patch.msgid.link/20240906023956.1004440-1-ruanjinjie@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/spi/atmel-quadspi.c