]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
spi: spi-imx: Fix pm_runtime_set_suspended() with runtime pm enabled
authorJinjie Ruan <ruanjinjie@huawei.com>
Mon, 23 Sep 2024 04:00:13 +0000 (12:00 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 17 Oct 2024 13:11:33 +0000 (15:11 +0200)
commit0e2d6c17afb455ff57d798727cce3f25e9288321
tree05b6e41c23d2f17f2dd51b9449fb17f8ac2b8551
parent2a07e6f0ad8a6e504a3912cfe8dc859b7d0740a5
spi: spi-imx: Fix pm_runtime_set_suspended() with runtime pm enabled

[ Upstream commit b6e05ba0844139dde138625906015c974c86aa93 ]

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: 43b6bf406cd0 ("spi: imx: fix runtime pm support for !CONFIG_PM")
Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com>
Link: https://patch.msgid.link/20240923040015.3009329-2-ruanjinjie@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/spi/spi-imx.c