aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/drm/drm_dma.c
diff options
context:
space:
mode:
authorRobert Noland <rnoland@FreeBSD.org>2008-10-13 18:03:27 +0000
committerRobert Noland <rnoland@FreeBSD.org>2008-10-13 18:03:27 +0000
commitf00755f06b7fc157dacf6eaa6d97521fa3b1e51e (patch)
tree9afb72dec01dcbe8a080c5adf1bdbdde1abd41bd /sys/dev/drm/drm_dma.c
parentb470dd86f8b7f32a45f4dd50bd5ce0ce86ef09e9 (diff)
downloadsrc-f00755f06b7fc157dacf6eaa6d97521fa3b1e51e.tar.gz
src-f00755f06b7fc157dacf6eaa6d97521fa3b1e51e.zip
Notes
Diffstat (limited to 'sys/dev/drm/drm_dma.c')
-rw-r--r--sys/dev/drm/drm_dma.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/sys/dev/drm/drm_dma.c b/sys/dev/drm/drm_dma.c
index e630c2549e3c..f99b16b770dc 100644
--- a/sys/dev/drm/drm_dma.c
+++ b/sys/dev/drm/drm_dma.c
@@ -44,7 +44,7 @@ __FBSDID("$FreeBSD$");
int drm_dma_setup(struct drm_device *dev)
{
- dev->dma = malloc(sizeof(*dev->dma), M_DRM, M_NOWAIT | M_ZERO);
+ dev->dma = malloc(sizeof(*dev->dma), DRM_MEM_DRIVER, M_NOWAIT | M_ZERO);
if (dev->dma == NULL)
return ENOMEM;
@@ -70,21 +70,21 @@ void drm_dma_takedown(struct drm_device *dev)
for (j = 0; j < dma->bufs[i].seg_count; j++) {
drm_pci_free(dev, dma->bufs[i].seglist[j]);
}
- free(dma->bufs[i].seglist, M_DRM);
+ free(dma->bufs[i].seglist, DRM_MEM_SEGS);
}
if (dma->bufs[i].buf_count) {
for (j = 0; j < dma->bufs[i].buf_count; j++) {
free(dma->bufs[i].buflist[j].dev_private,
- M_DRM);
+ DRM_MEM_BUFS);
}
- free(dma->bufs[i].buflist, M_DRM);
+ free(dma->bufs[i].buflist, DRM_MEM_BUFS);
}
}
- free(dma->buflist, M_DRM);
- free(dma->pagelist, M_DRM);
- free(dev->dma, M_DRM);
+ free(dma->buflist, DRM_MEM_BUFS);
+ free(dma->pagelist, DRM_MEM_PAGES);
+ free(dev->dma, DRM_MEM_DRIVER);
dev->dma = NULL;
DRM_SPINUNINIT(&dev->dma_lock);
}