Commit a75013a5 authored by Dmitry Osipenko's avatar Dmitry Osipenko Committed by Vinod Koul

dmaengine: tegra-apb: Remove assumptions about unavailable runtime PM

The runtime PM is always available on all Tegra SoCs since the commit
40b2bb1b ("ARM: tegra: enforce PM requirement"), so there is no
need to handle the case of unavailable RPM in the code anymore.
Signed-off-by: default avatarDmitry Osipenko <digetx@gmail.com>
Acked-by: default avatarJon Hunter <jonathanh@nvidia.com>
Link: https://lore.kernel.org/r/20200209163356.6439-11-digetx@gmail.comSigned-off-by: default avatarVinod Koul <vkoul@kernel.org>
parent 14c63abf
...@@ -1433,11 +1433,8 @@ static int tegra_dma_probe(struct platform_device *pdev) ...@@ -1433,11 +1433,8 @@ static int tegra_dma_probe(struct platform_device *pdev)
spin_lock_init(&tdma->global_lock); spin_lock_init(&tdma->global_lock);
pm_runtime_enable(&pdev->dev); pm_runtime_enable(&pdev->dev);
if (!pm_runtime_enabled(&pdev->dev))
ret = tegra_dma_runtime_resume(&pdev->dev);
else
ret = pm_runtime_get_sync(&pdev->dev);
ret = pm_runtime_get_sync(&pdev->dev);
if (ret < 0) if (ret < 0)
goto err_pm_disable; goto err_pm_disable;
...@@ -1550,8 +1547,6 @@ static int tegra_dma_probe(struct platform_device *pdev) ...@@ -1550,8 +1547,6 @@ static int tegra_dma_probe(struct platform_device *pdev)
err_pm_disable: err_pm_disable:
pm_runtime_disable(&pdev->dev); pm_runtime_disable(&pdev->dev);
if (!pm_runtime_status_suspended(&pdev->dev))
tegra_dma_runtime_suspend(&pdev->dev);
return ret; return ret;
} }
...@@ -1561,10 +1556,7 @@ static int tegra_dma_remove(struct platform_device *pdev) ...@@ -1561,10 +1556,7 @@ static int tegra_dma_remove(struct platform_device *pdev)
struct tegra_dma *tdma = platform_get_drvdata(pdev); struct tegra_dma *tdma = platform_get_drvdata(pdev);
dma_async_device_unregister(&tdma->dma_dev); dma_async_device_unregister(&tdma->dma_dev);
pm_runtime_disable(&pdev->dev); pm_runtime_disable(&pdev->dev);
if (!pm_runtime_status_suspended(&pdev->dev))
tegra_dma_runtime_suspend(&pdev->dev);
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment