diff options
author | Dave Airlie <airlied@linux.ie> | 2004-08-17 13:10:05 +0000 |
---|---|---|
committer | Dave Airlie <airlied@linux.ie> | 2004-08-17 13:10:05 +0000 |
commit | 5c9ed8309493acb099463d25b32fabb5b7c004af (patch) | |
tree | eec5be6f9374b5a2f61d52bd02ba0a44ba7e636d /linux/drm_context.h | |
parent | 93e8c201afac565942f9d3523ac808d3220d6d0e (diff) |
Merged drmfntbl-0-0-1drmfntbl-0-0-1-20040817-merge
Diffstat (limited to 'linux/drm_context.h')
-rw-r--r-- | linux/drm_context.h | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/linux/drm_context.h b/linux/drm_context.h index 0cf34549..dd280e53 100644 --- a/linux/drm_context.h +++ b/linux/drm_context.h @@ -420,10 +420,13 @@ int DRM(addctx)( struct inode *inode, struct file *filp, /* Should this return -EBUSY instead? */ return -ENOMEM; } -#ifdef DRIVER_CTX_CTOR + if ( ctx.handle != DRM_KERNEL_CONTEXT ) - DRIVER_CTX_CTOR(dev, ctx.handle); -#endif + { + if (dev->fn_tbl.context_ctor) + dev->fn_tbl.context_ctor(dev, ctx.handle); + } + ctx_entry = DRM(alloc)( sizeof(*ctx_entry), DRM_MEM_CTXLIST ); if ( !ctx_entry ) { DRM_DEBUG("out of memory\n"); @@ -555,9 +558,8 @@ int DRM(rmctx)( struct inode *inode, struct file *filp, priv->remove_auth_on_close = 1; } if ( ctx.handle != DRM_KERNEL_CONTEXT ) { -#ifdef DRIVER_CTX_DTOR - DRIVER_CTX_DTOR(dev, ctx.handle); -#endif + if (dev->fn_tbl.context_ctor) + dev->fn_tbl.context_ctor(dev, ctx.handle); DRM(ctxbitmap_free)( dev, ctx.handle ); } |