summaryrefslogtreecommitdiff
path: root/linux-core
diff options
context:
space:
mode:
authorJesse Barnes <jesse.barnes@intel.com>2007-09-25 16:16:33 -0700
committerJesse Barnes <jesse.barnes@intel.com>2007-09-25 16:16:33 -0700
commit053ff86566bcf050c7fd5b5dc7158bb35d39c38b (patch)
tree1ba1d3b39f95a85730e94e74e5926f96e786b1f8 /linux-core
parent5433bbbfde10bed7fbafcd90c64c364546ca724f (diff)
Move map hash destruction to after driver unload hook is called
The driver unload routine will want to remove register and SAREA maps, so don't destroy the map hash before we get there.
Diffstat (limited to 'linux-core')
-rw-r--r--linux-core/drm_drv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/linux-core/drm_drv.c b/linux-core/drm_drv.c
index 9004d535..5d2745e2 100644
--- a/linux-core/drm_drv.c
+++ b/linux-core/drm_drv.c
@@ -391,7 +391,6 @@ static void drm_cleanup(struct drm_device * dev)
drm_lastclose(dev);
drm_fence_manager_takedown(dev);
- drm_ht_remove(&dev->map_hash);
drm_mm_takedown(&dev->offset_manager);
drm_ht_remove(&dev->object_hash);
@@ -412,6 +411,7 @@ static void drm_cleanup(struct drm_device * dev)
if (dev->driver->unload)
dev->driver->unload(dev);
+ drm_ht_remove(&dev->map_hash);
if (drm_core_has_AGP(dev) && dev->agp) {
drm_free(dev->agp, sizeof(*dev->agp), DRM_MEM_AGPLISTS);
dev->agp = NULL;