drm/exynos: fix duplicated mutex lock issue
authorInki Dae <inki.dae@samsung.com>
Tue, 11 Sep 2012 07:35:23 +0000 (16:35 +0900)
committerInki Dae <inki.dae@samsung.com>
Thu, 4 Oct 2012 01:06:01 +0000 (10:06 +0900)
exynos_drm_crtc_dpms function doesn't need mutex lock
because mutex lock was called by drm framework so this
patch removes mutex lock call from that function to avoid
duplicated mutex locking.

Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
drivers/gpu/drm/exynos/exynos_drm_crtc.c

index b612bf5bc1a896a854a3ba5f78750de688d1e687..8bd4d7ed964bcf51031bccb86352c3d7ece55a44 100644 (file)
@@ -66,7 +66,6 @@ struct exynos_drm_crtc {
 
 static void exynos_drm_crtc_dpms(struct drm_crtc *crtc, int mode)
 {
-       struct drm_device *dev = crtc->dev;
        struct exynos_drm_crtc *exynos_crtc = to_exynos_crtc(crtc);
 
        DRM_DEBUG_KMS("crtc[%d] mode[%d]\n", crtc->base.id, mode);
@@ -76,12 +75,8 @@ static void exynos_drm_crtc_dpms(struct drm_crtc *crtc, int mode)
                return;
        }
 
-       mutex_lock(&dev->struct_mutex);
-
        exynos_drm_fn_encoder(crtc, &mode, exynos_drm_encoder_crtc_dpms);
        exynos_crtc->dpms = mode;
-
-       mutex_unlock(&dev->struct_mutex);
 }
 
 static void exynos_drm_crtc_prepare(struct drm_crtc *crtc)