summaryrefslogtreecommitdiff
path: root/bsd-core/mga_drv.c
diff options
context:
space:
mode:
Diffstat (limited to 'bsd-core/mga_drv.c')
-rw-r--r--bsd-core/mga_drv.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/bsd-core/mga_drv.c b/bsd-core/mga_drv.c
index 5554236a..af250e83 100644
--- a/bsd-core/mga_drv.c
+++ b/bsd-core/mga_drv.c
@@ -127,9 +127,9 @@ mga_attach(device_t nbdev)
{
struct drm_device *dev = device_get_softc(nbdev);
- bzero(dev, sizeof(struct drm_device));
+ dev->driver = malloc(sizeof(struct drm_driver_info), DRM_MEM_DRIVER,
+ M_WAITOK | M_ZERO);
- dev->driver = malloc(sizeof(struct drm_driver_info), M_DRM, M_NOWAIT | M_ZERO);
mga_configure(dev);
return drm_attach(nbdev, mga_pciidlist);
@@ -143,7 +143,7 @@ mga_detach(device_t nbdev)
ret = drm_detach(nbdev);
- free(dev->driver, M_DRM);
+ free(dev->driver, DRM_MEM_DRIVER);
return ret;
}