]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
spi: spi-fsl-lpspi: Undo runtime PM changes at driver exit time
authorJinjie Ruan <ruanjinjie@huawei.com>
Fri, 6 Sep 2024 02:12:51 +0000 (10:12 +0800)
committerMark Brown <broonie@kernel.org>
Thu, 19 Sep 2024 10:51:20 +0000 (12:51 +0200)
It's important to undo pm_runtime_use_autosuspend() with
pm_runtime_dont_use_autosuspend() at driver exit time unless driver
initially enabled pm_runtime with devm_pm_runtime_enable()
(which handles it for you).

Hence, call pm_runtime_dont_use_autosuspend() at driver exit time
to fix it.

Fixes: 944c01a889d9 ("spi: lpspi: enable runtime pm for lpspi")
Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com>
Link: https://patch.msgid.link/20240906021251.610462-1-ruanjinjie@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-fsl-lpspi.c

index 8ecb426be45c75e1337451f4a34d83fc3bdb6f78..977e8b55c82b7ddc1dc1b05c41cfc838c93b40e0 100644 (file)
@@ -986,6 +986,7 @@ static void fsl_lpspi_remove(struct platform_device *pdev)
 
        fsl_lpspi_dma_exit(controller);
 
+       pm_runtime_dont_use_autosuspend(fsl_lpspi->dev);
        pm_runtime_disable(fsl_lpspi->dev);
 }