From 5c9ed8309493acb099463d25b32fabb5b7c004af Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Tue, 17 Aug 2004 13:10:05 +0000 Subject: Merged drmfntbl-0-0-1 --- bsd-core/drm_context.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'bsd-core/drm_context.c') diff --git a/bsd-core/drm_context.c b/bsd-core/drm_context.c index a61b7788..aa655297 100644 --- a/bsd-core/drm_context.c +++ b/bsd-core/drm_context.c @@ -278,10 +278,8 @@ int DRM(addctx)( DRM_IOCTL_ARGS ) return DRM_ERR(ENOMEM); } -#ifdef DRIVER_CTX_CTOR - if ( ctx.handle != DRM_KERNEL_CONTEXT ) - DRIVER_CTX_CTOR(dev, ctx.handle); -#endif + if ( dev->fn_tbl.context_ctor && ctx.handle != DRM_KERNEL_CONTEXT ) + dev->fn_tbl.context_ctor(dev, ctx.handle); DRM_COPY_TO_USER_IOCTL( (drm_ctx_t *)data, ctx, sizeof(ctx) ); @@ -341,9 +339,9 @@ int DRM(rmctx)( DRM_IOCTL_ARGS ) DRM_DEBUG( "%d\n", ctx.handle ); if ( ctx.handle != DRM_KERNEL_CONTEXT ) { -#ifdef DRIVER_CTX_DTOR - DRIVER_CTX_DTOR(dev, ctx.handle); -#endif + if (dev->fn_tbl.context_dtor) + dev->fn_tbl.context_dtor(dev, ctx.handle); + DRM(ctxbitmap_free)( dev, ctx.handle ); } -- cgit v1.2.3