summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--linux-core/drm_drv.c3
-rw-r--r--linux/drm_drv.h3
2 files changed, 4 insertions, 2 deletions
diff --git a/linux-core/drm_drv.c b/linux-core/drm_drv.c
index 3eec29a0..83b9600c 100644
--- a/linux-core/drm_drv.c
+++ b/linux-core/drm_drv.c
@@ -913,8 +913,9 @@ int DRM(release)( struct inode *inode, struct file *filp )
#ifdef DRIVER_CTX_DTOR
DRIVER_CTX_DTOR(pos->handle);
#endif
+#if __HAVE_CTX_BITMAP
DRM(ctxbitmap_free)( dev, pos->handle );
-
+#endif
list_del( &pos->head );
DRM(free)( pos, sizeof(*pos), DRM_MEM_CTXLIST );
}
diff --git a/linux/drm_drv.h b/linux/drm_drv.h
index 3eec29a0..83b9600c 100644
--- a/linux/drm_drv.h
+++ b/linux/drm_drv.h
@@ -913,8 +913,9 @@ int DRM(release)( struct inode *inode, struct file *filp )
#ifdef DRIVER_CTX_DTOR
DRIVER_CTX_DTOR(pos->handle);
#endif
+#if __HAVE_CTX_BITMAP
DRM(ctxbitmap_free)( dev, pos->handle );
-
+#endif
list_del( &pos->head );
DRM(free)( pos, sizeof(*pos), DRM_MEM_CTXLIST );
}