diff options
-rw-r--r-- | sys/arch/alpha/tc/tc_3000_300.c | 13 | ||||
-rw-r--r-- | sys/arch/alpha/tc/tc_3000_500.c | 13 | ||||
-rw-r--r-- | sys/arch/alpha/tc/tc_conf.h | 8 | ||||
-rw-r--r-- | sys/dev/tc/tc.c | 7 | ||||
-rw-r--r-- | sys/dev/tc/tcvar.h | 8 |
5 files changed, 27 insertions, 22 deletions
diff --git a/sys/arch/alpha/tc/tc_3000_300.c b/sys/arch/alpha/tc/tc_3000_300.c index 5ab9b91a1a8..7d95c20c091 100644 --- a/sys/arch/alpha/tc/tc_3000_300.c +++ b/sys/arch/alpha/tc/tc_3000_300.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tc_3000_300.c,v 1.16 2010/09/22 11:44:01 matthew Exp $ */ +/* $OpenBSD: tc_3000_300.c,v 1.17 2010/09/22 12:36:32 miod Exp $ */ /* $NetBSD: tc_3000_300.c,v 1.26 2001/07/27 00:25:21 thorpej Exp $ */ /* @@ -119,8 +119,6 @@ tc_3000_300_intr_establish(tcadev, cookie, level, func, arg, name) volatile u_int32_t *imskp; u_long dev = (u_long)cookie; - KASSERT(name != NULL); - #ifdef DIAGNOSTIC /* XXX bounds-check cookie. */ #endif @@ -130,7 +128,8 @@ tc_3000_300_intr_establish(tcadev, cookie, level, func, arg, name) tc_3000_300_intr[dev].tci_func = func; tc_3000_300_intr[dev].tci_arg = arg; - evcount_attach(&tc_3000_300_intr[dev].tci_count, name, NULL); + if (name != NULL) + evcount_attach(&tc_3000_300_intr[dev].tci_count, name, NULL); imskp = (volatile u_int32_t *)(DEC_3000_300_IOASIC_ADDR + IOASIC_IMSK); switch (dev) { @@ -147,9 +146,10 @@ tc_3000_300_intr_establish(tcadev, cookie, level, func, arg, name) } void -tc_3000_300_intr_disestablish(tcadev, cookie) +tc_3000_300_intr_disestablish(tcadev, cookie, name) struct device *tcadev; void *cookie; + const char *name; { volatile u_int32_t *imskp; u_long dev = (u_long)cookie; @@ -177,7 +177,8 @@ tc_3000_300_intr_disestablish(tcadev, cookie) tc_3000_300_intr[dev].tci_func = tc_3000_300_intrnull; tc_3000_300_intr[dev].tci_arg = (void *)dev; - evcount_detach(&tc_3000_300_intr[dev].tci_count); + if (name != NULL) + evcount_detach(&tc_3000_300_intr[dev].tci_count); } int diff --git a/sys/arch/alpha/tc/tc_3000_500.c b/sys/arch/alpha/tc/tc_3000_500.c index 37b3ca9c636..53d9f99fe10 100644 --- a/sys/arch/alpha/tc/tc_3000_500.c +++ b/sys/arch/alpha/tc/tc_3000_500.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tc_3000_500.c,v 1.17 2010/09/22 11:44:01 matthew Exp $ */ +/* $OpenBSD: tc_3000_500.c,v 1.18 2010/09/22 12:36:32 miod Exp $ */ /* $NetBSD: tc_3000_500.c,v 1.24 2001/07/27 00:25:21 thorpej Exp $ */ /* @@ -136,8 +136,6 @@ tc_3000_500_intr_establish(tcadev, cookie, level, func, arg, name) { u_long dev = (u_long)cookie; - KASSERT(name != NULL); - #ifdef DIAGNOSTIC /* XXX bounds-check cookie. */ #endif @@ -147,7 +145,8 @@ tc_3000_500_intr_establish(tcadev, cookie, level, func, arg, name) tc_3000_500_intr[dev].tci_func = func; tc_3000_500_intr[dev].tci_arg = arg; - evcount_attach(&tc_3000_500_intr[dev].tci_count, name, NULL); + if (name != NULL) + evcount_attach(&tc_3000_500_intr[dev].tci_count, name, NULL); tc_3000_500_imask &= ~tc_3000_500_intrbits[dev]; *(volatile u_int32_t *)TC_3000_500_IMR_WRITE = tc_3000_500_imask; @@ -155,9 +154,10 @@ tc_3000_500_intr_establish(tcadev, cookie, level, func, arg, name) } void -tc_3000_500_intr_disestablish(tcadev, cookie) +tc_3000_500_intr_disestablish(tcadev, cookie, name) struct device *tcadev; void *cookie; + const char *name; { u_long dev = (u_long)cookie; @@ -175,7 +175,8 @@ tc_3000_500_intr_disestablish(tcadev, cookie) tc_3000_500_intr[dev].tci_func = tc_3000_500_intrnull; tc_3000_500_intr[dev].tci_arg = (void *)dev; - evcount_detach(&tc_3000_500_intr[dev].tci_count); + if (name != NULL) + evcount_detach(&tc_3000_500_intr[dev].tci_count); } int diff --git a/sys/arch/alpha/tc/tc_conf.h b/sys/arch/alpha/tc/tc_conf.h index 00dd6718389..4abefe530cb 100644 --- a/sys/arch/alpha/tc/tc_conf.h +++ b/sys/arch/alpha/tc/tc_conf.h @@ -1,4 +1,4 @@ -/* $OpenBSD: tc_conf.h,v 1.10 2008/08/09 16:42:29 miod Exp $ */ +/* $OpenBSD: tc_conf.h,v 1.11 2010/09/22 12:36:32 miod Exp $ */ /* $NetBSD: tc_conf.h,v 1.10 2000/06/04 19:14:29 cgd Exp $ */ /* @@ -40,7 +40,8 @@ extern void tc_3000_500_iointr(void *, unsigned long); extern void tc_3000_500_intr_establish(struct device *, void *, int, int (*)(void *), void *, const char *); -extern void tc_3000_500_intr_disestablish(struct device *, void *); +extern void tc_3000_500_intr_disestablish(struct device *, void *, + const char *); extern int tc_3000_500_nslots; extern struct tc_slotdesc tc_3000_500_slots[]; @@ -58,7 +59,8 @@ extern void tc_3000_300_iointr(void *, unsigned long); extern void tc_3000_300_intr_establish(struct device *, void *, int, int (*)(void *), void *, const char *); -extern void tc_3000_300_intr_disestablish(struct device *, void *); +extern void tc_3000_300_intr_disestablish(struct device *, void *, + const char *); extern int tc_3000_300_nslots; extern struct tc_slotdesc tc_3000_300_slots[]; diff --git a/sys/dev/tc/tc.c b/sys/dev/tc/tc.c index c2aa1ab5aef..89765bafc6a 100644 --- a/sys/dev/tc/tc.c +++ b/sys/dev/tc/tc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tc.c,v 1.18 2008/08/09 16:42:30 miod Exp $ */ +/* $OpenBSD: tc.c,v 1.19 2010/09/22 12:36:32 miod Exp $ */ /* $NetBSD: tc.c,v 1.29 2001/11/13 06:26:10 lukem Exp $ */ /* @@ -274,13 +274,14 @@ tc_intr_establish(dev, cookie, level, handler, arg, name) } void -tc_intr_disestablish(dev, cookie) +tc_intr_disestablish(dev, cookie, name) struct device *dev; void *cookie; + const char *name; { struct tc_softc *sc = tc_cd.cd_devs[0]; - (*sc->sc_intr_disestablish)(dev, cookie); + (*sc->sc_intr_disestablish)(dev, cookie, name); } #ifdef TCVERBOSE diff --git a/sys/dev/tc/tcvar.h b/sys/dev/tc/tcvar.h index d5bd23188ac..f9d73392f23 100644 --- a/sys/dev/tc/tcvar.h +++ b/sys/dev/tc/tcvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: tcvar.h,v 1.14 2008/08/09 16:42:30 miod Exp $ */ +/* $OpenBSD: tcvar.h,v 1.15 2010/09/22 12:36:32 miod Exp $ */ /* $NetBSD: tcvar.h,v 1.17 2000/06/04 19:15:15 cgd Exp $ */ /* @@ -52,7 +52,7 @@ struct tc_softc { void (*sc_intr_establish)(struct device *, void *, int, int (*)(void *), void *, const char *); - void (*sc_intr_disestablish)(struct device *, void *); + void (*sc_intr_disestablish)(struct device *, void *, const char *); bus_dma_tag_t (*sc_get_dma_tag)(int); }; @@ -74,7 +74,7 @@ struct tcbus_attach_args { /* TC bus resource management; XXX will move elsewhere eventually. */ void (*tba_intr_establish)(struct device *, void *, int, int (*)(void *), void *, const char *); - void (*tba_intr_disestablish)(struct device *, void *); + void (*tba_intr_disestablish)(struct device *, void *, const char *); bus_dma_tag_t (*tba_get_dma_tag)(int); }; @@ -122,7 +122,7 @@ void tc_devinfo(const char *, char *, size_t); void tcattach(struct device *, struct device *, void *); void tc_intr_establish(struct device *, void *, int, int (*)(void *), void *, const char *); -void tc_intr_disestablish(struct device *, void *); +void tc_intr_disestablish(struct device *, void *, const char *); /* * Easy to remember names for TURBOchannel device locators. |