]> 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)
committerMark Brown <broonie@kernel.org>
Mon, 30 Sep 2024 20:54:59 +0000 (21:54 +0100)
commitb6e05ba0844139dde138625906015c974c86aa93
treeccad3840c25cf3eb98172e45a6c52e054d3b2b73
parent9852d85ec9d492ebef56dc5f229416c925758edc
spi: spi-imx: Fix pm_runtime_set_suspended() with runtime pm enabled

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>
drivers/spi/spi-imx.c