mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-11-03 08:04:58 +01:00
dmaengine: tegra210-adma: Using pm_runtime_resume_and_get to replace open coding
use pm_runtime_resume_and_get() to replace pm_runtime_get_sync and pm_runtime_put_noidle. this change is just to simplify the code, there is no actual functional change. Signed-off-by: Zhang Qilong <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
This commit is contained in:
1 parent
48ae638be5
commit
059e969c2a
1 file changed
+2
-5
@@ -655,9 +655,8 @@ static int tegra_adma_alloc_chan_resources(struct dma_chan *dc)
|
||||
return ret;
|
||||
}
|
||||
|
||||
ret = pm_runtime_get_sync(tdc2dev(tdc));
|
||||
ret = pm_runtime_resume_and_get(tdc2dev(tdc));
|
||||
if (ret < 0) {
|
||||
pm_runtime_put_noidle(tdc2dev(tdc));
|
||||
free_irq(tdc->irq, tdc);
|
||||
return ret;
|
||||
}
|
||||
@@ -869,10 +868,8 @@ static int tegra_adma_probe(struct platform_device *pdev)
|
||||
pm_runtime_enable(&pdev->dev);
|
||||
|
||||
ret = pm_runtime_get_sync(&pdev->dev);
|
||||
if (ret < 0) {
|
||||
pm_runtime_put_noidle(&pdev->dev);
|
||||
if (ret < 0)
|
||||
goto rpm_disable;
|
||||
}
|
||||
|
||||
ret = tegra_adma_init(tdma);
|
||||
if (ret)
|
||||
|
||||
Reference in new issue
Block a user