aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/drm/drm_drv.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@linux.ie>2007-07-16 20:55:47 -0400
committerDave Airlie <airlied@linux.ie>2007-07-16 21:04:33 -0400
commitd4e2cbe9cb9219fc924191a6baa2369140cb5ea8 (patch)
treef4858a3794f47ea3ae36333ae7ca182a46913b65 /drivers/char/drm/drm_drv.c
parent62968144e673016180f530fdfe170874b80ab5a7 (diff)
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.c15
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)
151 if (dev->irq_enabled) 151 if (dev->irq_enabled)
152 drm_irq_uninstall(dev); 152 drm_irq_uninstall(dev);
153 153
154 /* Free drawable information memory */
155 for (i = 0; i < dev->drw_bitfield_length / sizeof(*dev->drw_bitfield);
156 i++) {
157 struct drm_drawable_info *info = drm_get_drawable_info(dev, i);
158
159 if (info) {
160 drm_free(info->rects, info->num_rects *
161 sizeof(struct drm_clip_rect), DRM_MEM_BUFS);
162 drm_free(info, sizeof(*info), DRM_MEM_BUFS);
163 }
164 }
165
166 mutex_lock(&dev->struct_mutex); 154 mutex_lock(&dev->struct_mutex);
155
156 /* Free drawable information memory */
157 drm_drawable_free_all(dev);
167 del_timer(&dev->timer); 158 del_timer(&dev->timer);
168 159
169 /* Clear pid list */ 160 /* Clear pid list */