summaryrefslogtreecommitdiff
path: root/bsd
diff options
context:
space:
mode:
Diffstat (limited to 'bsd')
-rw-r--r--bsd/drm_dma.h10
1 files changed, 2 insertions, 8 deletions
diff --git a/bsd/drm_dma.h b/bsd/drm_dma.h
index 877fd4e1..d5852403 100644
--- a/bsd/drm_dma.h
+++ b/bsd/drm_dma.h
@@ -46,17 +46,11 @@
int DRM(dma_setup)( drm_device_t *dev )
{
- int i;
- dev->dma = DRM(alloc)( sizeof(*dev->dma), DRM_MEM_DRIVER );
- if ( !dev->dma )
+ dev->dma = DRM(calloc)(1, sizeof(*dev->dma), DRM_MEM_DRIVER);
+ if (dev->dma == NULL)
return DRM_ERR(ENOMEM);
- memset( dev->dma, 0, sizeof(*dev->dma) );
-
- for ( i = 0 ; i <= DRM_MAX_ORDER ; i++ )
- memset(&dev->dma->bufs[i], 0, sizeof(dev->dma->bufs[0]));
-
return 0;
}