Unverified Commit 22195768 authored by Jinjie Ruan's avatar Jinjie Ruan Committed by Mark Brown
Browse files

spi: zynqmp-gqspi: Undo runtime PM changes at driver exit time​



It's important to undo pm_runtime_use_autosuspend() with
pm_runtime_dont_use_autosuspend() at driver exit time.

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

Fixes: 9e3a0003 ("spi: zynqmp: Add pm runtime support")
Signed-off-by: default avatarJinjie Ruan <ruanjinjie@huawei.com>
Link: https://patch.msgid.link/20240920091135.2741574-1-ruanjinjie@huawei.com


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 25d28471
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -1351,6 +1351,7 @@ static int zynqmp_qspi_probe(struct platform_device *pdev)

clk_dis_all:
	pm_runtime_disable(&pdev->dev);
	pm_runtime_dont_use_autosuspend(&pdev->dev);
	pm_runtime_put_noidle(&pdev->dev);
	pm_runtime_set_suspended(&pdev->dev);
	clk_disable_unprepare(xqspi->refclk);
@@ -1379,6 +1380,7 @@ static void zynqmp_qspi_remove(struct platform_device *pdev)
	zynqmp_gqspi_write(xqspi, GQSPI_EN_OFST, 0x0);

	pm_runtime_disable(&pdev->dev);
	pm_runtime_dont_use_autosuspend(&pdev->dev);
	pm_runtime_put_noidle(&pdev->dev);
	pm_runtime_set_suspended(&pdev->dev);
	clk_disable_unprepare(xqspi->refclk);