]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/gpu/drm/drm_fops.c
saner FASYNC handling on file close
[linux-2.6-omap-h63xx.git] / drivers / gpu / drm / drm_fops.c
index dcf8b4dc954919f874a878bddd35a0bcf8906eec..78eeed5caaff1ed68ed01cb2cd27a2ed156caa49 100644 (file)
@@ -256,6 +256,9 @@ static int drm_open_helper(struct inode *inode, struct file *filp,
 
        INIT_LIST_HEAD(&priv->lhead);
 
+       if (dev->driver->driver_features & DRIVER_GEM)
+               drm_gem_open(dev, priv);
+
        if (dev->driver->open) {
                ret = dev->driver->open(dev, priv);
                if (ret < 0)
@@ -400,7 +403,8 @@ int drm_release(struct inode *inode, struct file *filp)
                dev->driver->reclaim_buffers(dev, file_priv);
        }
 
-       drm_fasync(-1, filp, 0);
+       if (dev->driver->driver_features & DRIVER_GEM)
+               drm_gem_release(dev, file_priv);
 
        mutex_lock(&dev->ctxlist_mutex);
        if (!list_empty(&dev->ctxlist)) {