fbdev: omapfb/dss: Use pm_runtime_resume_and_get() instead of pm_runtime_get_sync()
Using the newest pm_runtime_resume_and_get is more appropriate for simplifing code here. Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com> Signed-off-by: Helge Deller <deller@gmx.de>
This commit is contained in:
parent
2559f17ec8
commit
b0e0706007
@ -519,11 +519,9 @@ int dispc_runtime_get(void)
|
||||
|
||||
DSSDBG("dispc_runtime_get\n");
|
||||
|
||||
r = pm_runtime_get_sync(&dispc.pdev->dev);
|
||||
if (WARN_ON(r < 0)) {
|
||||
pm_runtime_put_sync(&dispc.pdev->dev);
|
||||
r = pm_runtime_resume_and_get(&dispc.pdev->dev);
|
||||
if (WARN_ON(r < 0))
|
||||
return r;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(dispc_runtime_get);
|
||||
|
@ -1136,11 +1136,9 @@ static int dsi_runtime_get(struct platform_device *dsidev)
|
||||
|
||||
DSSDBG("dsi_runtime_get\n");
|
||||
|
||||
r = pm_runtime_get_sync(&dsi->pdev->dev);
|
||||
if (WARN_ON(r < 0)) {
|
||||
pm_runtime_put_sync(&dsi->pdev->dev);
|
||||
r = pm_runtime_resume_and_get(&dsi->pdev->dev);
|
||||
if (WARN_ON(r < 0))
|
||||
return r;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -767,11 +767,9 @@ int dss_runtime_get(void)
|
||||
|
||||
DSSDBG("dss_runtime_get\n");
|
||||
|
||||
r = pm_runtime_get_sync(&dss.pdev->dev);
|
||||
if (WARN_ON(r < 0)) {
|
||||
pm_runtime_put_sync(&dss.pdev->dev);
|
||||
r = pm_runtime_resume_and_get(&dss.pdev->dev);
|
||||
if (WARN_ON(r < 0))
|
||||
return r;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -38,11 +38,9 @@ static int hdmi_runtime_get(void)
|
||||
|
||||
DSSDBG("hdmi_runtime_get\n");
|
||||
|
||||
r = pm_runtime_get_sync(&hdmi.pdev->dev);
|
||||
if (WARN_ON(r < 0)) {
|
||||
pm_runtime_put_sync(&hdmi.pdev->dev);
|
||||
r = pm_runtime_resume_and_get(&hdmi.pdev->dev);
|
||||
if (WARN_ON(r < 0))
|
||||
return r;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -42,11 +42,9 @@ static int hdmi_runtime_get(void)
|
||||
|
||||
DSSDBG("hdmi_runtime_get\n");
|
||||
|
||||
r = pm_runtime_get_sync(&hdmi.pdev->dev);
|
||||
if (WARN_ON(r < 0)) {
|
||||
pm_runtime_put_sync(&hdmi.pdev->dev);
|
||||
r = pm_runtime_resume_and_get(&hdmi.pdev->dev);
|
||||
if (WARN_ON(r < 0))
|
||||
return r;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -347,11 +347,9 @@ static int venc_runtime_get(void)
|
||||
|
||||
DSSDBG("venc_runtime_get\n");
|
||||
|
||||
r = pm_runtime_get_sync(&venc.pdev->dev);
|
||||
if (WARN_ON(r < 0)) {
|
||||
pm_runtime_put_sync(&venc.pdev->dev);
|
||||
r = pm_runtime_resume_and_get(&venc.pdev->dev);
|
||||
if (WARN_ON(r < 0))
|
||||
return r;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user