From 00081f593e2749a0951b95fdd51655fdbbe5da35 Mon Sep 17 00:00:00 2001 From: jmcneill Date: Sun, 27 Sep 2009 12:59:38 +0000 Subject: [PATCH] deregister with pmf on detach --- sys/external/bsd/drm/dist/bsd-core/i915_drv.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/sys/external/bsd/drm/dist/bsd-core/i915_drv.c b/sys/external/bsd/drm/dist/bsd-core/i915_drv.c index 8363d6a3d13d..d8bbb5aecfda 100644 --- a/sys/external/bsd/drm/dist/bsd-core/i915_drv.c +++ b/sys/external/bsd/drm/dist/bsd-core/i915_drv.c @@ -203,8 +203,16 @@ i915drm_attach(device_t parent, device_t self, void *aux) drm_attach(self, pa, i915_pciidlist); } +static int +i915drm_detach(device_t self, int flags) +{ + pmf_device_deregister(self); + + return drm_detach(self, flags); +} + CFATTACH_DECL_NEW(i915drm, sizeof(struct drm_device), i915drm_probe, - i915drm_attach, drm_detach, drm_activate); + i915drm_attach, i915drm_detach, drm_activate); #ifdef _MODULE