Commit a89b6c8f authored by Tian Tao's avatar Tian Tao Committed by Inki Dae

drm/exynos: Use 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 to avoid continuing to increase the refcount
when pm_runtime_get_sync fails.
Signed-off-by: default avatarTian Tao <tiantao6@hisilicon.com>
Reviewed-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: default avatarInki Dae <inki.dae@samsung.com>
parent c707b73f
......@@ -268,11 +268,9 @@ static void mic_pre_enable(struct drm_bridge *bridge)
if (mic->enabled)
goto unlock;
ret = pm_runtime_get_sync(mic->dev);
if (ret < 0) {
pm_runtime_put_noidle(mic->dev);
ret = pm_runtime_resume_and_get(mic->dev);
if (ret < 0)
goto unlock;
}
mic_set_path(mic, 1);
......
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