From a89b6c8f86b9ae245558572b5247dc8ff10f2fe8 Mon Sep 17 00:00:00 2001 From: Tian Tao Date: Mon, 24 May 2021 20:07:57 +0800 Subject: [PATCH] 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: Tian Tao Reviewed-by: Daniel Vetter Signed-off-by: Inki Dae --- drivers/gpu/drm/exynos/exynos_drm_mic.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_drm_mic.c b/drivers/gpu/drm/exynos/exynos_drm_mic.c index 3821ea76a7039..32672bf8ae4a9 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_mic.c +++ b/drivers/gpu/drm/exynos/exynos_drm_mic.c @@ -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); -- 2.39.5