diff options
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) | |||
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 */ |