diff options
author | Dave Airlie <airlied@linux.ie> | 2004-08-19 12:26:12 +0000 |
---|---|---|
committer | Dave Airlie <airlied@linux.ie> | 2004-08-19 12:26:12 +0000 |
commit | 6978e5afbd8197fe0d9269bfe4177ea80f682fd9 (patch) | |
tree | faef87dfbac48d8e22a5f0c49dd0697c204f034a /linux-core | |
parent | 8a39241a1d85be8c1ac51a23bbd6b3ce1702cea2 (diff) |
add free filp private pointer to cleanup after open_helperdrmfntbl-0-0-2-20040824-freeze
Diffstat (limited to 'linux-core')
-rw-r--r-- | linux-core/drmP.h | 4 | ||||
-rw-r--r-- | linux-core/drm_drv.c | 2 |
2 files changed, 6 insertions, 0 deletions
diff --git a/linux-core/drmP.h b/linux-core/drmP.h index 1be3375c..a7a0e32b 100644 --- a/linux-core/drmP.h +++ b/linux-core/drmP.h @@ -517,7 +517,11 @@ struct drm_driver_fn { int (*postcleanup)(struct drm_device *); int (*presetup)(struct drm_device *); int (*postsetup)(struct drm_device *); + + /* these are opposites at the moment */ int (*open_helper)(struct drm_device *, drm_file_t *); + void (*free_filp_private)(struct drm_device *, drm_file_t *); + void (*release)(struct drm_device *, struct file *filp); void (*dma_ready)(struct drm_device *); int (*dma_quiescent)(struct drm_device *); diff --git a/linux-core/drm_drv.c b/linux-core/drm_drv.c index 7a165d5c..8b07a298 100644 --- a/linux-core/drm_drv.c +++ b/linux-core/drm_drv.c @@ -941,6 +941,8 @@ int DRM(release)( struct inode *inode, struct file *filp ) } up( &dev->struct_sem ); + if (dev->fn_tbl.free_filp_private) + dev->fn_tbl.free_filp_private( dev, priv ); DRM(free)( priv, sizeof(*priv), DRM_MEM_FILES ); /* ======================================================== |