diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2005-01-27 17:04:57 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2005-01-27 17:04:57 +0000 |
commit | e2e21911f37c4003cbf60a7f2cf01287dbf71565 (patch) | |
tree | 11e0f79fe51124bcf8a0805a8771ccd372bdc2c6 /sys/dev/pcmcia/gpr.c | |
parent | 7b4677abf4abc2b0e1c8b1d23b4f711f4839f65c (diff) |
Use pcmcia_intr_string() for printing the irq (or error) string.
Diffstat (limited to 'sys/dev/pcmcia/gpr.c')
-rw-r--r-- | sys/dev/pcmcia/gpr.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/sys/dev/pcmcia/gpr.c b/sys/dev/pcmcia/gpr.c index 027f5b198bf..89695ab642b 100644 --- a/sys/dev/pcmcia/gpr.c +++ b/sys/dev/pcmcia/gpr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: gpr.c,v 1.10 2003/06/02 19:21:49 fgsch Exp $ */ +/* $OpenBSD: gpr.c,v 1.11 2005/01/27 17:04:55 millert Exp $ */ /* * Copyright (c) 2002, Federico G. Schwindt @@ -152,6 +152,7 @@ gpr_attach(struct device *parent, struct device *self, void *aux) struct gpr_softc *sc = (void *)self; struct pcmcia_attach_args *pa = aux; struct pcmcia_config_entry *cfe; + const char *intrstr; for (cfe = SIMPLEQ_FIRST(&pa->pf->cfe_head); cfe; cfe = SIMPLEQ_NEXT(cfe, cfe_list)) { @@ -203,14 +204,10 @@ gpr_attach(struct device *parent, struct device *self, void *aux) sc->sc_ih = pcmcia_intr_establish(pa->pf, IPL_TTY, gpr_intr, sc, sc->sc_dev.dv_xname); - if (sc->sc_ih == NULL) { - printf(": couldn't establish interrupt\n"); - goto fail_intr; - } - - printf("\n"); - - return; + intrstr = pcmcia_intr_string(psc->sc_pf, sc->sc_ih); + printf("%s%s\n", *intrstr ? ", " : "", intrstr); + if (sc->sc_ih != NULL) + return; fail_intr: pcmcia_mem_unmap(pa->pf, sc->sc_memwin); |