summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/drm_fops.c
diff options
context:
space:
mode:
authorAndrzej Hajda <a.hajda@samsung.com>2014-09-30 16:49:56 +0200
committerDaniel Vetter <daniel.vetter@ffwll.ch>2014-10-03 10:38:56 +0200
commit1bcecfacde6269dc6cee9a098bc454222d441ff9 (patch)
tree1bb6021abc55846fcf9f0b4f44510e39afdbe8ed /drivers/gpu/drm/drm_fops.c
parent5a11f7f829a8d1b5c1c4774afcd263a2066d3179 (diff)
downloadop-kernel-dev-1bcecfacde6269dc6cee9a098bc454222d441ff9.zip
op-kernel-dev-1bcecfacde6269dc6cee9a098bc454222d441ff9.tar.gz
drm/core: use helper to check driver features
The patch replaces direct access to driver_features field by calls to helper function. Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Reviewed-by: David Herrmann <dh.herrmann@gmail.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/drm_fops.c')
-rw-r--r--drivers/gpu/drm/drm_fops.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/gpu/drm/drm_fops.c b/drivers/gpu/drm/drm_fops.c
index 3e66946..ed7bc68 100644
--- a/drivers/gpu/drm/drm_fops.c
+++ b/drivers/gpu/drm/drm_fops.c
@@ -171,7 +171,7 @@ static int drm_open_helper(struct file *filp, struct drm_minor *minor)
init_waitqueue_head(&priv->event_wait);
priv->event_space = 4096; /* set aside 4k for event buffer */
- if (dev->driver->driver_features & DRIVER_GEM)
+ if (drm_core_check_feature(dev, DRIVER_GEM))
drm_gem_open(dev, priv);
if (drm_core_check_feature(dev, DRIVER_PRIME))
@@ -256,7 +256,7 @@ out_close:
out_prime_destroy:
if (drm_core_check_feature(dev, DRIVER_PRIME))
drm_prime_destroy_file_private(&priv->prime);
- if (dev->driver->driver_features & DRIVER_GEM)
+ if (drm_core_check_feature(dev, DRIVER_GEM))
drm_gem_release(dev, priv);
put_pid(priv->pid);
kfree(priv);
@@ -408,10 +408,10 @@ int drm_release(struct inode *inode, struct file *filp)
drm_events_release(file_priv);
- if (dev->driver->driver_features & DRIVER_MODESET)
+ if (drm_core_check_feature(dev, DRIVER_MODESET))
drm_fb_release(file_priv);
- if (dev->driver->driver_features & DRIVER_GEM)
+ if (drm_core_check_feature(dev, DRIVER_GEM))
drm_gem_release(dev, file_priv);
drm_legacy_ctxbitmap_flush(dev, file_priv);
OpenPOWER on IntegriCloud