]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
spi: spi-cadence: Fix pm_runtime_set_suspended() with runtime pm enabled
authorJinjie Ruan <ruanjinjie@huawei.com>
Mon, 23 Sep 2024 04:00:14 +0000 (12:00 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 10 Oct 2024 10:00:41 +0000 (12:00 +0200)
commit954313740674dcf380da4572ae6406a4087a9f06
tree47919902bcae9def7396ed6b34896983018cc40f
parent9b61acfa6f75d688fd651956dca42599e04ec133
spi: spi-cadence: Fix pm_runtime_set_suspended() with runtime pm enabled

[ Upstream commit 67d4a70faa662df07451e83db1546d3ca0695e08 ]

It is not valid to call pm_runtime_set_suspended() for devices
with runtime PM enabled because it returns -EAGAIN if it is enabled
already and working. So, call pm_runtime_disable() before to fix it.

Fixes: d36ccd9f7ea4 ("spi: cadence: Runtime pm adaptation")
Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com>
Link: https://patch.msgid.link/20240923040015.3009329-3-ruanjinjie@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/spi/spi-cadence.c