From d4e2cbe9cb9219fc924191a6baa2369140cb5ea8 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Tue, 17 Jul 2007 10:55:47 +1000 Subject: drm: convert drawable code to using idr MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This converts the code for allocating drawables to the Linux idr, Fixes from: Michel Dänzer , Kristian Høgsberg Signed-off-by: Dave Airlie --- drivers/char/drm/drmP.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'drivers/char/drm/drmP.h') diff --git a/drivers/char/drm/drmP.h b/drivers/char/drm/drmP.h index b1cafe3..0df87fc 100644 --- a/drivers/char/drm/drmP.h +++ b/drivers/char/drm/drmP.h @@ -751,10 +751,7 @@ struct drm_device { /** \name Drawable information */ /*@{ */ spinlock_t drw_lock; - unsigned int drw_bitfield_length; - u32 *drw_bitfield; - unsigned int drw_info_length; - struct drm_drawable_info **drw_info; + struct idr drw_idr; /*@} */ }; @@ -904,6 +901,7 @@ extern int drm_update_drawable_info(struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg); extern struct drm_drawable_info *drm_get_drawable_info(struct drm_device *dev, drm_drawable_t id); +extern void drm_drawable_free_all(struct drm_device *dev); /* Authentication IOCTL support (drm_auth.h) */ extern int drm_getmagic(struct inode *inode, struct file *filp, -- cgit v1.1