diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-09-30 11:29:54 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-09-30 11:29:54 -0700 |
commit | e823aff2d6eb43083abcc75a32ddfb167c324089 (patch) | |
tree | 60b67f3f2f088d6741a5af8488b4a565fb4c4cfe /drivers/char/drm/drm_drv.c | |
parent | 77ed74da26f50fa28471571ee7a2251b77526d84 (diff) | |
parent | 3e14a2867d8ccf555fe6e318eac0f8200399fe1c (diff) |
Merge branch 'drm-patches' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6
* 'drm-patches' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6: (36 commits)
drm: Use register writes instead of BITBLT_MULTI packets for buffer swap blits
drm: use radeon specific names for radeon flags
drm: add device/vendor id to drm_device_t for compat with FreeBSD drivers
drm: allow multiple addMaps with the same 32-bit map offsset.
drm: fd.o Bug #7595: Avoid u32 overflows in radeon_check_and_fixup_offset().
drm: Fix hashtab implementation leaking illegal error codes to user space.
drm: domain changes broke ppc r200
drm: fixup setversion return codes..
drm: fixup i915 error codes
drm: realign sosme radeon code with drm git tree
drm: realign via driver with drm git tree
drm: remove hash tables on drm exit
drm: cleanups
drm: i810_dma.c: fix pointer arithmetic for 64-bit target
drm: avoid kernel oops in some error paths calling drm_lastclose
drm: allow detection of new VIA chipsets
drm: fix i965 build bug
drm: remove FALSE/TRUE that snuck in with simple memory manager changes.
drm: Add support for Intel i965G chipsets.
drm: add better explanation for i830/i915
...
Diffstat (limited to 'drivers/char/drm/drm_drv.c')
-rw-r--r-- | drivers/char/drm/drm_drv.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/char/drm/drm_drv.c b/drivers/char/drm/drm_drv.c index 3c0b882a8e7..b366c5b1bd1 100644 --- a/drivers/char/drm/drm_drv.c +++ b/drivers/char/drm/drm_drv.c @@ -118,7 +118,7 @@ static drm_ioctl_desc_t drm_ioctls[] = { [DRM_IOCTL_NR(DRM_IOCTL_WAIT_VBLANK)] = {drm_wait_vblank, 0}, }; -#define DRIVER_IOCTL_COUNT DRM_ARRAY_SIZE( drm_ioctls ) +#define DRIVER_IOCTL_COUNT ARRAY_SIZE( drm_ioctls ) /** * Take down the DRM device. @@ -155,12 +155,13 @@ int drm_lastclose(drm_device_t * dev) del_timer(&dev->timer); /* Clear pid list */ - for (i = 0; i < DRM_HASH_SIZE; i++) { - for (pt = dev->magiclist[i].head; pt; pt = next) { - next = pt->next; + if (dev->magicfree.next) { + list_for_each_entry_safe(pt, next, &dev->magicfree, head) { + list_del(&pt->head); + drm_ht_remove_item(&dev->magiclist, &pt->hash_item); drm_free(pt, sizeof(*pt), DRM_MEM_MAGIC); } - dev->magiclist[i].head = dev->magiclist[i].tail = NULL; + 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); |