diff options
| author | joerg <joerg@NetBSD.org> | 2009-04-17 19:02:33 +0000 |
|---|---|---|
| committer | joerg <joerg@NetBSD.org> | 2009-04-17 19:02:33 +0000 |
| commit | 95021059eb62dbadbd4ea5044e481216d5626292 (patch) | |
| tree | 1f0d3bd0c6fa24af3957ff400c918e2f0a004ae9 /sys/dev | |
| parent | 6655a8f4e6dc8909375ea1b72e4c20b9280e219d (diff) | |
Move initialisation of the irq spinlock into the device handling code,
at least the Intel driver depends on it whether the IRQ is currently
enabled or not.
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/drm/drm_drv.c | 7 | ||||
| -rw-r--r-- | sys/dev/drm/drm_irq.c | 7 |
2 files changed, 7 insertions, 7 deletions
diff --git a/sys/dev/drm/drm_drv.c b/sys/dev/drm/drm_drv.c index be3898f9629..3ea8c129da9 100644 --- a/sys/dev/drm/drm_drv.c +++ b/sys/dev/drm/drm_drv.c @@ -1,4 +1,4 @@ -/* $NetBSD: drm_drv.c,v 1.22 2009/01/31 13:49:29 bouyer Exp $ */ +/* $NetBSD: drm_drv.c,v 1.23 2009/04/17 19:02:33 joerg Exp $ */ /* drm_drv.h -- Generic driver template -*- linux-c -*- * Created: Thu Nov 23 03:10:50 2000 by gareth@valinux.com @@ -34,7 +34,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: drm_drv.c,v 1.22 2009/01/31 13:49:29 bouyer Exp $"); +__KERNEL_RCSID(0, "$NetBSD: drm_drv.c,v 1.23 2009/04/17 19:02:33 joerg Exp $"); /* __FBSDID("$FreeBSD: src/sys/dev/drm/drm_drv.c,v 1.6 2006/09/07 23:04:47 anholt Exp $"); */ @@ -302,6 +302,7 @@ static int drm_firstopen(drm_device_t *dev) int i; DRM_SPINLOCK_ASSERT(&dev->dev_lock); + DRM_SPININIT(&dev->irq_lock, "DRM IRQ lock"); /* prebuild the SAREA */ i = drm_addmap(dev, 0, SAREA_MAX, _DRM_SHM, @@ -436,6 +437,8 @@ static int drm_lastclose(drm_device_t *dev) free(filep, M_DRM); } + DRM_SPINUNINIT(&dev->irq_lock); + return 0; } diff --git a/sys/dev/drm/drm_irq.c b/sys/dev/drm/drm_irq.c index e785ef57b3e..9bcb39ad409 100644 --- a/sys/dev/drm/drm_irq.c +++ b/sys/dev/drm/drm_irq.c @@ -1,4 +1,4 @@ -/* $NetBSD: drm_irq.c,v 1.16 2008/07/07 00:33:23 mrg Exp $ */ +/* $NetBSD: drm_irq.c,v 1.17 2009/04/17 19:02:33 joerg Exp $ */ /* drm_irq.c -- IRQ IOCTL and function support * Created: Fri Oct 18 2003 by anholt@FreeBSD.org @@ -31,7 +31,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: drm_irq.c,v 1.16 2008/07/07 00:33:23 mrg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: drm_irq.c,v 1.17 2009/04/17 19:02:33 joerg Exp $"); /* __FBSDID("$FreeBSD: src/sys/dev/drm/drm_irq.c,v 1.2 2005/11/28 23:13:52 anholt Exp $"); */ @@ -94,8 +94,6 @@ int drm_irq_install(drm_device_t *dev) dev->context_flag = 0; - DRM_SPININIT(&dev->irq_lock, "DRM IRQ lock"); - /* Before installing handler */ dev->driver.irq_preinstall(dev); @@ -141,7 +139,6 @@ int drm_irq_uninstall(drm_device_t *dev) dev->driver.irq_uninstall(dev); pci_intr_disestablish(dev->pa.pa_pc, dev->irqh); - DRM_SPINUNINIT(&dev->irq_lock); return 0; } |
