aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/cp
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2005-09-19 03:10:21 +0000
committerWarner Losh <imp@FreeBSD.org>2005-09-19 03:10:21 +0000
commitad4f426ef63acf8f93962c281274c677a055e500 (patch)
treec3358cebc77043ea8b2a3a5036b02dad6a674b7e /sys/dev/cp
parent6763e7c1edc7198eca8ab7017018b03f5c41e012 (diff)
Notes
Diffstat (limited to 'sys/dev/cp')
-rw-r--r--sys/dev/cp/if_cp.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/dev/cp/if_cp.c b/sys/dev/cp/if_cp.c
index ab24f6ff11b0..f6ecd74a4331 100644
--- a/sys/dev/cp/if_cp.c
+++ b/sys/dev/cp/if_cp.c
@@ -1438,6 +1438,9 @@ static int cp_detach (device_t dev)
cp_reset (b, 0 ,0);
callout_stop (&led_timo[b->num]);
+ /* Disable the interrupt request. */
+ bus_teardown_intr (dev, bd->cp_irq, bd->cp_intrhand);
+
for (c=b->chan; c<b->chan+NCHAN; ++c) {
drv_t *d = (drv_t*) c->sys;
@@ -1470,8 +1473,6 @@ static int cp_detach (device_t dev)
b->sys = NULL;
CP_UNLOCK (bd);
- /* Disable the interrupt request. */
- bus_teardown_intr (dev, bd->cp_irq, bd->cp_intrhand);
bus_deactivate_resource (dev, SYS_RES_IRQ, 0, bd->cp_irq);
bus_release_resource (dev, SYS_RES_IRQ, 0, bd->cp_irq);
bus_release_resource (dev, SYS_RES_MEMORY, PCIR_BAR(0), bd->cp_res);