summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
diff options
context:
space:
mode:
authorFrank Binns <frank.binns@imgtec.com>2016-06-24 19:15:15 +0200
committerDaniel Vetter <daniel.vetter@ffwll.ch>2016-07-12 13:07:20 +0200
commit0d02c4a1b1b1774a47b6e154db5194fa827accd6 (patch)
tree6250801569cec8315bb975b2be3ecce45ea4eb2f /drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
parentdrm/udl: Unplugging a device now unregisters it (diff)
downloadlinux-0d02c4a1b1b1774a47b6e154db5194fa827accd6.tar.xz
linux-0d02c4a1b1b1774a47b6e154db5194fa827accd6.zip
drm/vmwgfx: Stop checking minor type directly
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
Diffstat (limited to 'drivers/gpu/drm/vmwgfx/vmwgfx_drv.c')
-rw-r--r--drivers/gpu/drm/vmwgfx/vmwgfx_drv.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
index 60646644bef3..5d5c9515618d 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
@@ -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);