From 98d01f9542d7f70aa10d68c0e41e631b5f156770 Mon Sep 17 00:00:00 2001 From: Thomas Hellstrom Date: Tue, 7 Dec 2004 12:18:47 +0000 Subject: Patch from Jon Smirl from Nov. 2nd that makes older X servers behave well with linux-core. Without this, they will fail on their second invocation since the drm already has a busID assigned. Submitted by: Jon Smirl --- linux-core/drm_drv.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/linux-core/drm_drv.c b/linux-core/drm_drv.c index cf09528c..fbebe23c 100644 --- a/linux-core/drm_drv.c +++ b/linux-core/drm_drv.c @@ -153,6 +153,12 @@ int drm_takedown(drm_device_t * dev) down(&dev->struct_sem); del_timer(&dev->timer); + if (dev->unique) { + drm_free(dev->unique, strlen(dev->unique) + 1, DRM_MEM_DRIVER); + dev->unique = NULL; + dev->unique_len = 0; + } + /* Clear pid list */ for (i = 0; i < DRM_HASH_SIZE; i++) { for (pt = dev->magiclist[i].head; pt; pt = next) { -- cgit v1.2.3