diff options
Diffstat (limited to 'linux-core/drm_drv.c')
-rw-r--r-- | linux-core/drm_drv.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/linux-core/drm_drv.c b/linux-core/drm_drv.c index 98fb9ac8..0b9ce30a 100644 --- a/linux-core/drm_drv.c +++ b/linux-core/drm_drv.c @@ -395,14 +395,6 @@ static void drm_cleanup(struct drm_device * dev) drm_lastclose(dev); drm_fence_manager_takedown(dev); - drm_mm_takedown(&dev->offset_manager); - drm_ht_remove(&dev->object_hash); - - if (!drm_fb_loaded) - pci_disable_device(dev->pdev); - - drm_ctxbitmap_cleanup(dev); - if (drm_core_has_MTRR(dev) && drm_core_has_AGP(dev) && dev->agp && dev->agp->agp_mtrr >= 0) { int retval; @@ -424,6 +416,11 @@ static void drm_cleanup(struct drm_device * dev) if (!drm_fb_loaded) pci_disable_device(dev->pdev); + drm_ctxbitmap_cleanup(dev); + drm_ht_remove(&dev->map_hash); + drm_mm_takedown(&dev->offset_manager); + drm_ht_remove(&dev->object_hash); + drm_put_head(&dev->primary); if (drm_put_dev(dev)) DRM_ERROR("Cannot unload module\n"); |