diff options
author | Thomas Hellstrom <thomas-at-tungstengraphics-dot-com> | 2006-08-18 16:37:10 +1000 |
---|---|---|
committer | Dave Airlie <airlied@linux.ie> | 2006-09-22 05:32:33 +1000 |
commit | 1f4eccfdb2a5f8b2751aea8cf2d6b00401c156e0 (patch) | |
tree | 4ad236f299d478a6a2ce7c59b921c50fb2bd1206 /drivers/char/drm | |
parent | fb41e54be4bad6f64d343d051d699efde3c92e2c (diff) | |
download | kernel_samsung_crespo-1f4eccfdb2a5f8b2751aea8cf2d6b00401c156e0.zip kernel_samsung_crespo-1f4eccfdb2a5f8b2751aea8cf2d6b00401c156e0.tar.gz kernel_samsung_crespo-1f4eccfdb2a5f8b2751aea8cf2d6b00401c156e0.tar.bz2 |
drm: remove hash tables on drm exit
Signed-off-by: Dave Airlie <airlied@linux.ie>
Diffstat (limited to 'drivers/char/drm')
-rw-r--r-- | drivers/char/drm/drm_drv.c | 2 | ||||
-rw-r--r-- | drivers/char/drm/drm_fops.c | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/drivers/char/drm/drm_drv.c b/drivers/char/drm/drm_drv.c index 654b95c..b366c5b 100644 --- a/drivers/char/drm/drm_drv.c +++ b/drivers/char/drm/drm_drv.c @@ -161,6 +161,7 @@ int drm_lastclose(drm_device_t * dev) drm_ht_remove_item(&dev->magiclist, &pt->hash_item); drm_free(pt, sizeof(*pt), DRM_MEM_MAGIC); } + drm_ht_remove(&dev->magiclist); } /* Clear AGP information */ @@ -299,6 +300,7 @@ static void drm_cleanup(drm_device_t * dev) if (dev->maplist) { drm_free(dev->maplist, sizeof(*dev->maplist), DRM_MEM_MAPS); dev->maplist = NULL; + drm_ht_remove(&dev->map_hash); } drm_ctxbitmap_cleanup(dev); diff --git a/drivers/char/drm/drm_fops.c b/drivers/char/drm/drm_fops.c index 2bbf45d..898f47d 100644 --- a/drivers/char/drm/drm_fops.c +++ b/drivers/char/drm/drm_fops.c @@ -53,6 +53,8 @@ static int drm_setup(drm_device_t * dev) return ret; } + dev->magicfree.next = NULL; + /* prebuild the SAREA */ i = drm_addmap(dev, 0, SAREA_MAX, _DRM_SHM, _DRM_CONTAINS_LOCK, &map); if (i != 0) |