Skip to content

Commit 134a723

Browse files
digetxbroonie
authored andcommitted
spi: tegra210-quad: Put device into suspend on driver removal
pm_runtime_disable() cancels all pending power requests, while they should be completed for the Tegra SPI driver. Otherwise SPI clock won't be disabled ever again because clk refcount will become unbalanced. Enforce runtime PM suspension to put device into expected state before driver is unbound and device's RPM state is reset by driver's core. Signed-off-by: Dmitry Osipenko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 3cc1cb3 commit 134a723

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/spi/spi-tegra210-quad.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1318,7 +1318,7 @@ static int tegra_qspi_probe(struct platform_device *pdev)
13181318
exit_free_irq:
13191319
free_irq(qspi_irq, tqspi);
13201320
exit_pm_disable:
1321-
pm_runtime_disable(&pdev->dev);
1321+
pm_runtime_force_suspend(&pdev->dev);
13221322
tegra_qspi_deinit_dma(tqspi);
13231323
return ret;
13241324
}
@@ -1330,7 +1330,7 @@ static int tegra_qspi_remove(struct platform_device *pdev)
13301330

13311331
spi_unregister_master(master);
13321332
free_irq(tqspi->irq, tqspi);
1333-
pm_runtime_disable(&pdev->dev);
1333+
pm_runtime_force_suspend(&pdev->dev);
13341334
tegra_qspi_deinit_dma(tqspi);
13351335

13361336
return 0;

0 commit comments

Comments
 (0)