Skip to content

Commit a89b6c8

Browse files
Tian Taodaeinki
authored andcommitted
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 <tiantao6@hisilicon.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Inki Dae <inki.dae@samsung.com>
1 parent c707b73 commit a89b6c8

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

drivers/gpu/drm/exynos/exynos_drm_mic.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -268,11 +268,9 @@ static void mic_pre_enable(struct drm_bridge *bridge)
268268
if (mic->enabled)
269269
goto unlock;
270270

271-
ret = pm_runtime_get_sync(mic->dev);
272-
if (ret < 0) {
273-
pm_runtime_put_noidle(mic->dev);
271+
ret = pm_runtime_resume_and_get(mic->dev);
272+
if (ret < 0)
274273
goto unlock;
275-
}
276274

277275
mic_set_path(mic, 1);
278276

0 commit comments

Comments
 (0)