Skip to content

Commit b6e05ba

Browse files
Jinjie Ruanbroonie
authored andcommitted
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: 43b6bf4 ("spi: imx: fix runtime pm support for !CONFIG_PM") Signed-off-by: Jinjie Ruan <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 9852d85 commit b6e05ba

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/spi/spi-imx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1865,8 +1865,8 @@ static int spi_imx_probe(struct platform_device *pdev)
18651865
spi_imx_sdma_exit(spi_imx);
18661866
out_runtime_pm_put:
18671867
pm_runtime_dont_use_autosuspend(spi_imx->dev);
1868-
pm_runtime_set_suspended(&pdev->dev);
18691868
pm_runtime_disable(spi_imx->dev);
1869+
pm_runtime_set_suspended(&pdev->dev);
18701870

18711871
clk_disable_unprepare(spi_imx->clk_ipg);
18721872
out_put_per:

0 commit comments

Comments
 (0)