diff options
author | Dave Airlie <airlied@linux.ie> | 2007-07-17 10:55:47 +1000 |
---|---|---|
committer | Dave Airlie <airlied@linux.ie> | 2007-07-17 11:04:33 +1000 |
commit | d4e2cbe9cb9219fc924191a6baa2369140cb5ea8 (patch) | |
tree | f4858a3794f47ea3ae36333ae7ca182a46913b65 /drivers/char/drm/drm_drv.c | |
parent | 62968144e673016180f530fdfe170874b80ab5a7 (diff) | |
download | lwn-d4e2cbe9cb9219fc924191a6baa2369140cb5ea8.tar.gz lwn-d4e2cbe9cb9219fc924191a6baa2369140cb5ea8.zip |
drm: convert drawable code to using idr
This converts the code for allocating drawables to the Linux idr,
Fixes from: Michel Dänzer <michel@tungstengraphics.com>, Kristian Høgsberg <krh@redhat.com>
Signed-off-by: Dave Airlie <airlied@linux.ie>
Diffstat (limited to 'drivers/char/drm/drm_drv.c')
-rw-r--r-- | drivers/char/drm/drm_drv.c | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/drivers/char/drm/drm_drv.c b/drivers/char/drm/drm_drv.c index d5cf5cfccf78..19994cd865de 100644 --- a/drivers/char/drm/drm_drv.c +++ b/drivers/char/drm/drm_drv.c @@ -151,19 +151,10 @@ int drm_lastclose(struct drm_device * dev) if (dev->irq_enabled) drm_irq_uninstall(dev); - /* Free drawable information memory */ - for (i = 0; i < dev->drw_bitfield_length / sizeof(*dev->drw_bitfield); - i++) { - struct drm_drawable_info *info = drm_get_drawable_info(dev, i); - - if (info) { - drm_free(info->rects, info->num_rects * - sizeof(struct drm_clip_rect), DRM_MEM_BUFS); - drm_free(info, sizeof(*info), DRM_MEM_BUFS); - } - } - mutex_lock(&dev->struct_mutex); + + /* Free drawable information memory */ + drm_drawable_free_all(dev); del_timer(&dev->timer); /* Clear pid list */ |