drm/vmwgfx: Stop checking minor type directly
authorFrank Binns <frank.binns@imgtec.com>
Fri, 24 Jun 2016 17:15:15 +0000 (18:15 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 12 Jul 2016 11:07:20 +0000 (13:07 +0200)
Use the appropriate drm minor type helper instead.

Cc: Sinclair Yeh <syeh@vmware.com>
Cc: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-by: Sinclair Yeh <syeh@vmware.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1466788520-21325-2-git-send-email-frank.binns@imgtec.com
drivers/gpu/drm/vmwgfx/vmwgfx_drv.c

index 60646644bef36a8c2f889f6aa24dfe5a40fdac43..5d5c9515618d628c2480aee061f8a71d8e6f53a3 100644 (file)
@@ -1041,8 +1041,7 @@ static struct vmw_master *vmw_master_check(struct drm_device *dev,
        struct vmw_fpriv *vmw_fp = vmw_fpriv(file_priv);
        struct vmw_master *vmaster;
 
-       if (file_priv->minor->type != DRM_MINOR_LEGACY ||
-           !(flags & DRM_AUTH))
+       if (!drm_is_primary_client(file_priv) || !(flags & DRM_AUTH))
                return NULL;
 
        ret = mutex_lock_interruptible(&dev->master_mutex);