static int i915_attach(device_t nbdev) { struct drm_device *dev = device_get_softc(nbdev); bzero(dev, sizeof(struct drm_device)); i915_configure(dev); return drm_attach(nbdev, i915_pciidlist); }
static void i915drm_attach(struct device *parent, struct device *self, void *aux) { struct pci_attach_args *pa = aux; drm_device_t *dev = (drm_device_t *)self; i915_configure(dev); pmf_device_register(self, NULL, NULL); drm_attach(self, pa, i915_pciidlist); }
static int i915_attach(device_t kdev) { struct drm_device *dev = device_get_softc(kdev); dev->driver = malloc(sizeof(struct drm_driver_info), DRM_MEM_DRIVER, M_WAITOK | M_ZERO); i915_configure(dev); return drm_attach(kdev, i915_pciidlist); }