summaryrefslogtreecommitdiff
path: root/bsd-core/drm_drv.c
diff options
context:
space:
mode:
Diffstat (limited to 'bsd-core/drm_drv.c')
-rw-r--r--bsd-core/drm_drv.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/bsd-core/drm_drv.c b/bsd-core/drm_drv.c
index a35d60a7..afcad193 100644
--- a/bsd-core/drm_drv.c
+++ b/bsd-core/drm_drv.c
@@ -280,7 +280,7 @@ static int drm_lastclose(struct drm_device *dev)
drm_irq_uninstall(dev);
if (dev->unique) {
- free(dev->unique, M_DRM);
+ free(dev->unique, DRM_MEM_DRIVER);
dev->unique = NULL;
dev->unique_len = 0;
}
@@ -288,7 +288,7 @@ static int drm_lastclose(struct drm_device *dev)
for (i = 0; i < DRM_HASH_SIZE; i++) {
for (pt = dev->magiclist[i].head; pt; pt = next) {
next = pt->next;
- free(pt, M_DRM);
+ free(pt, DRM_MEM_MAGIC);
}
dev->magiclist[i].head = dev->magiclist[i].tail = NULL;
}
@@ -310,7 +310,7 @@ static int drm_lastclose(struct drm_device *dev)
if (entry->bound)
drm_agp_unbind_memory(entry->handle);
drm_agp_free_memory(entry->handle);
- free(entry, M_DRM);
+ free(entry, DRM_MEM_AGPLISTS);
}
dev->agp->memory = NULL;
@@ -479,7 +479,7 @@ static void drm_unload(struct drm_device *dev)
}
if (dev->agp) {
- free(dev->agp, M_DRM);
+ free(dev->agp, DRM_MEM_AGPLISTS);
dev->agp = NULL;
}
@@ -534,7 +534,7 @@ int drm_open(struct cdev *kdev, int flags, int fmt, DRM_STRUCTPROC *p)
struct drm_device *dev = NULL;
int retcode = 0;
- dev = DRIVER_SOFTC(minor(kdev));
+ dev = DRIVER_SOFTC(dev2unit(kdev));
DRM_DEBUG("open_count = %d\n", dev->open_count);
@@ -623,7 +623,7 @@ void drm_close(void *data)
if (dev->driver->postclose != NULL)
dev->driver->postclose(dev, file_priv);
TAILQ_REMOVE(&dev->files, file_priv, link);
- free(file_priv, M_DRM);
+ free(file_priv, DRM_MEM_FILES);
/* ========================================================
* End inline drm_release