Merge tag 'spi-fix-v6.16-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi
Pull spi fix from Mark Brown: "One fix for a runtime PM underflow when removing the Cadence QuadSPI driver" * tag 'spi-fix-v6.16-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: spi: spi-cadence-quadspi: Fix pm runtime unbalance
This commit is contained in:
@@ -1958,10 +1958,10 @@ static int cqspi_probe(struct platform_device *pdev)
|
||||
goto probe_setup_failed;
|
||||
}
|
||||
|
||||
ret = devm_pm_runtime_enable(dev);
|
||||
if (ret) {
|
||||
if (cqspi->rx_chan)
|
||||
dma_release_channel(cqspi->rx_chan);
|
||||
pm_runtime_enable(dev);
|
||||
|
||||
if (cqspi->rx_chan) {
|
||||
dma_release_channel(cqspi->rx_chan);
|
||||
goto probe_setup_failed;
|
||||
}
|
||||
|
||||
@@ -1981,6 +1981,7 @@ static int cqspi_probe(struct platform_device *pdev)
|
||||
return 0;
|
||||
probe_setup_failed:
|
||||
cqspi_controller_enable(cqspi, 0);
|
||||
pm_runtime_disable(dev);
|
||||
probe_reset_failed:
|
||||
if (cqspi->is_jh7110)
|
||||
cqspi_jh7110_disable_clk(pdev, cqspi);
|
||||
@@ -1999,7 +2000,8 @@ static void cqspi_remove(struct platform_device *pdev)
|
||||
if (cqspi->rx_chan)
|
||||
dma_release_channel(cqspi->rx_chan);
|
||||
|
||||
clk_disable_unprepare(cqspi->clk);
|
||||
if (pm_runtime_get_sync(&pdev->dev) >= 0)
|
||||
clk_disable(cqspi->clk);
|
||||
|
||||
if (cqspi->is_jh7110)
|
||||
cqspi_jh7110_disable_clk(pdev, cqspi);
|
||||
|
||||
Reference in New Issue
Block a user