diff options
author | Jinjie Ruan <ruanjinjie@huawei.com> | 2024-09-23 07:00:13 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-10-10 12:57:40 +0300 |
commit | d6e3898d62a8d5a76d000d26d25b5cd24917b52f (patch) | |
tree | 7aa805ad482f43eaadd88a817426952b56117054 /drivers/spi | |
parent | c2d9f9a7837ab29ccae0c42252f17d436bf0a501 (diff) | |
download | linux-d6e3898d62a8d5a76d000d26d25b5cd24917b52f.tar.xz |
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>
Diffstat (limited to 'drivers/spi')
-rw-r--r-- | drivers/spi/spi-imx.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/spi/spi-imx.c b/drivers/spi/spi-imx.c index 006860ee03ca..daa32bde6155 100644 --- a/drivers/spi/spi-imx.c +++ b/drivers/spi/spi-imx.c @@ -1870,8 +1870,8 @@ out_register_controller: spi_imx_sdma_exit(spi_imx); out_runtime_pm_put: pm_runtime_dont_use_autosuspend(spi_imx->dev); - pm_runtime_set_suspended(&pdev->dev); pm_runtime_disable(spi_imx->dev); + pm_runtime_set_suspended(&pdev->dev); clk_disable_unprepare(spi_imx->clk_ipg); out_put_per: |