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>

authored by Jinjie Ruan and committed by Mark Brown b6e05ba0 9852d85e

+1 -1
+1 -1
drivers/spi/spi-imx.c
··· 1865 1865 spi_imx_sdma_exit(spi_imx); 1866 1866 out_runtime_pm_put: 1867 1867 pm_runtime_dont_use_autosuspend(spi_imx->dev); 1868 - pm_runtime_set_suspended(&pdev->dev); 1869 1868 pm_runtime_disable(spi_imx->dev); 1869 + pm_runtime_set_suspended(&pdev->dev); 1870 1870 1871 1871 clk_disable_unprepare(spi_imx->clk_ipg); 1872 1872 out_put_per: