Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Zhang Qilong and committed by
Helge Deller
b0e07060 2559f17e

+12 -24
+2 -4
drivers/video/fbdev/omap2/omapfb/dss/dispc.c
··· 519 519 520 520 DSSDBG("dispc_runtime_get\n"); 521 521 522 - r = pm_runtime_get_sync(&dispc.pdev->dev); 523 - if (WARN_ON(r < 0)) { 524 - pm_runtime_put_sync(&dispc.pdev->dev); 522 + r = pm_runtime_resume_and_get(&dispc.pdev->dev); 523 + if (WARN_ON(r < 0)) 525 524 return r; 526 - } 527 525 return 0; 528 526 } 529 527 EXPORT_SYMBOL(dispc_runtime_get);
+2 -4
drivers/video/fbdev/omap2/omapfb/dss/dsi.c
··· 1136 1136 1137 1137 DSSDBG("dsi_runtime_get\n"); 1138 1138 1139 - r = pm_runtime_get_sync(&dsi->pdev->dev); 1140 - if (WARN_ON(r < 0)) { 1141 - pm_runtime_put_sync(&dsi->pdev->dev); 1139 + r = pm_runtime_resume_and_get(&dsi->pdev->dev); 1140 + if (WARN_ON(r < 0)) 1142 1141 return r; 1143 - } 1144 1142 return 0; 1145 1143 } 1146 1144
+2 -4
drivers/video/fbdev/omap2/omapfb/dss/dss.c
··· 767 767 768 768 DSSDBG("dss_runtime_get\n"); 769 769 770 - r = pm_runtime_get_sync(&dss.pdev->dev); 771 - if (WARN_ON(r < 0)) { 772 - pm_runtime_put_sync(&dss.pdev->dev); 770 + r = pm_runtime_resume_and_get(&dss.pdev->dev); 771 + if (WARN_ON(r < 0)) 773 772 return r; 774 - } 775 773 return 0; 776 774 } 777 775
+2 -4
drivers/video/fbdev/omap2/omapfb/dss/hdmi4.c
··· 38 38 39 39 DSSDBG("hdmi_runtime_get\n"); 40 40 41 - r = pm_runtime_get_sync(&hdmi.pdev->dev); 42 - if (WARN_ON(r < 0)) { 43 - pm_runtime_put_sync(&hdmi.pdev->dev); 41 + r = pm_runtime_resume_and_get(&hdmi.pdev->dev); 42 + if (WARN_ON(r < 0)) 44 43 return r; 45 - } 46 44 47 45 return 0; 48 46 }
+2 -4
drivers/video/fbdev/omap2/omapfb/dss/hdmi5.c
··· 42 42 43 43 DSSDBG("hdmi_runtime_get\n"); 44 44 45 - r = pm_runtime_get_sync(&hdmi.pdev->dev); 46 - if (WARN_ON(r < 0)) { 47 - pm_runtime_put_sync(&hdmi.pdev->dev); 45 + r = pm_runtime_resume_and_get(&hdmi.pdev->dev); 46 + if (WARN_ON(r < 0)) 48 47 return r; 49 - } 50 48 51 49 return 0; 52 50 }
+2 -4
drivers/video/fbdev/omap2/omapfb/dss/venc.c
··· 347 347 348 348 DSSDBG("venc_runtime_get\n"); 349 349 350 - r = pm_runtime_get_sync(&venc.pdev->dev); 351 - if (WARN_ON(r < 0)) { 352 - pm_runtime_put_sync(&venc.pdev->dev); 350 + r = pm_runtime_resume_and_get(&venc.pdev->dev); 351 + if (WARN_ON(r < 0)) 353 352 return r; 354 - } 355 353 return 0; 356 354 } 357 355