diff options
author | Tian Tao <tiantao6@hisilicon.com> | 2021-05-24 20:07:57 +0800 |
---|---|---|
committer | Inki Dae <inki.dae@samsung.com> | 2021-06-11 10:56:27 +0900 |
commit | a89b6c8f86b9ae245558572b5247dc8ff10f2fe8 (patch) | |
tree | 7d2ce3f4c774189440f3ae3f951d57fb26ba8c27 /drivers/gpu/drm/exynos | |
parent | c707b73f0cfb1acc94a20389aecde65e6385349b (diff) | |
download | linux-a89b6c8f86b9ae245558572b5247dc8ff10f2fe8.tar.bz2 |
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>
Diffstat (limited to 'drivers/gpu/drm/exynos')
-rw-r--r-- | drivers/gpu/drm/exynos/exynos_drm_mic.c | 6 |
1 files 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 3821ea76a703..32672bf8ae4a 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); |