From 9c0ce38df3d9026785155d06fc62bdd7acaf8bf0 Mon Sep 17 00:00:00 2001 From: Robert Noland Date: Fri, 3 Oct 2008 14:05:45 -0400 Subject: [FreeBSD] Use M_WAITOK when allocating driver memory. We don't explicitly check for error here and M_WAITOK will just put the process to sleep waiting on resources to become available. Suggested by John Baldwin --- bsd-core/i915_drv.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'bsd-core/i915_drv.c') diff --git a/bsd-core/i915_drv.c b/bsd-core/i915_drv.c index def35f0b..b2658f05 100644 --- a/bsd-core/i915_drv.c +++ b/bsd-core/i915_drv.c @@ -111,7 +111,9 @@ i915_attach(device_t nbdev) bzero(dev, sizeof(struct drm_device)); - dev->driver = malloc(sizeof(struct drm_driver_info), M_DRM, M_NOWAIT | M_ZERO); + dev->driver = malloc(sizeof(struct drm_driver_info), M_DRM, + M_WAITOK | M_ZERO); + i915_configure(dev); return drm_attach(nbdev, i915_pciidlist); -- cgit v1.2.3