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