[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 Baldwinmain
parent
4c92abfa8d
commit
9c0ce38df3
|
@ -111,7 +111,9 @@ i915_attach(device_t nbdev)
|
||||||
|
|
||||||
bzero(dev, sizeof(struct drm_device));
|
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);
|
i915_configure(dev);
|
||||||
|
|
||||||
return drm_attach(nbdev, i915_pciidlist);
|
return drm_attach(nbdev, i915_pciidlist);
|
||||||
|
|
|
@ -85,7 +85,9 @@ mach64_attach(device_t nbdev)
|
||||||
|
|
||||||
bzero(dev, sizeof(struct drm_device));
|
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);
|
||||||
|
|
||||||
mach64_configure(dev);
|
mach64_configure(dev);
|
||||||
|
|
||||||
return drm_attach(nbdev, mach64_pciidlist);
|
return drm_attach(nbdev, mach64_pciidlist);
|
||||||
|
|
|
@ -129,7 +129,9 @@ mga_attach(device_t nbdev)
|
||||||
|
|
||||||
bzero(dev, sizeof(struct drm_device));
|
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);
|
||||||
|
|
||||||
mga_configure(dev);
|
mga_configure(dev);
|
||||||
|
|
||||||
return drm_attach(nbdev, mga_pciidlist);
|
return drm_attach(nbdev, mga_pciidlist);
|
||||||
|
|
|
@ -84,7 +84,9 @@ r128_attach(device_t nbdev)
|
||||||
|
|
||||||
bzero(dev, sizeof(struct drm_device));
|
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);
|
||||||
|
|
||||||
r128_configure(dev);
|
r128_configure(dev);
|
||||||
|
|
||||||
return drm_attach(nbdev, r128_pciidlist);
|
return drm_attach(nbdev, r128_pciidlist);
|
||||||
|
|
|
@ -89,7 +89,9 @@ radeon_attach(device_t nbdev)
|
||||||
|
|
||||||
bzero(dev, sizeof(struct drm_device));
|
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);
|
||||||
|
|
||||||
radeon_configure(dev);
|
radeon_configure(dev);
|
||||||
|
|
||||||
return drm_attach(nbdev, radeon_pciidlist);
|
return drm_attach(nbdev, radeon_pciidlist);
|
||||||
|
|
|
@ -75,7 +75,9 @@ savage_attach(device_t nbdev)
|
||||||
|
|
||||||
bzero(dev, sizeof(struct drm_device));
|
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);
|
||||||
|
|
||||||
savage_configure(dev);
|
savage_configure(dev);
|
||||||
|
|
||||||
return drm_attach(nbdev, savage_pciidlist);
|
return drm_attach(nbdev, savage_pciidlist);
|
||||||
|
|
|
@ -69,7 +69,9 @@ sis_attach(device_t nbdev)
|
||||||
|
|
||||||
bzero(dev, sizeof(struct drm_device));
|
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);
|
||||||
|
|
||||||
sis_configure(dev);
|
sis_configure(dev);
|
||||||
|
|
||||||
return drm_attach(nbdev, sis_pciidlist);
|
return drm_attach(nbdev, sis_pciidlist);
|
||||||
|
|
|
@ -71,7 +71,9 @@ tdfx_attach(device_t nbdev)
|
||||||
|
|
||||||
bzero(dev, sizeof(struct drm_device));
|
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);
|
||||||
|
|
||||||
tdfx_configure(dev);
|
tdfx_configure(dev);
|
||||||
|
|
||||||
return drm_attach(nbdev, tdfx_pciidlist);
|
return drm_attach(nbdev, tdfx_pciidlist);
|
||||||
|
|
|
@ -82,7 +82,9 @@ via_attach(device_t nbdev)
|
||||||
|
|
||||||
bzero(dev, sizeof(struct drm_device));
|
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);
|
||||||
|
|
||||||
via_configure(dev);
|
via_configure(dev);
|
||||||
|
|
||||||
return drm_attach(nbdev, via_pciidlist);
|
return drm_attach(nbdev, via_pciidlist);
|
||||||
|
|
Loading…
Reference in New Issue