Skip to content

Commit 3cc1cb3

Browse files
digetxbroonie
authored andcommitted
spi: tegra20-slink: 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 ca9b8f5 commit 3cc1cb3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/spi/spi-tegra20-slink.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1124,7 +1124,7 @@ static int tegra_slink_probe(struct platform_device *pdev)
11241124
exit_pm_put:
11251125
pm_runtime_put(&pdev->dev);
11261126
exit_pm_disable:
1127-
pm_runtime_disable(&pdev->dev);
1127+
pm_runtime_force_suspend(&pdev->dev);
11281128

11291129
tegra_slink_deinit_dma_param(tspi, false);
11301130
exit_rx_dma_free:
@@ -1143,7 +1143,7 @@ static int tegra_slink_remove(struct platform_device *pdev)
11431143

11441144
free_irq(tspi->irq, tspi);
11451145

1146-
pm_runtime_disable(&pdev->dev);
1146+
pm_runtime_force_suspend(&pdev->dev);
11471147

11481148
if (tspi->tx_dma_chan)
11491149
tegra_slink_deinit_dma_param(tspi, false);

0 commit comments

Comments
 (0)