diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2012-03-03 20:21:40 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2012-03-03 20:21:40 +0000 |
commit | f853daad836874d041eb3aac1138d37f24c1c8c3 (patch) | |
tree | 681754db289b8c0b7ec5e4627a0a3fdce0314f98 /sys/dev | |
parent | 12668f1e31f4645d4f08946baa259bc01f0d8cd8 (diff) |
Don't print the device name again in attach error messages occuring before
a newline ever gets printed. Found the hard way with a device dying on me.
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/pci/yds.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/sys/dev/pci/yds.c b/sys/dev/pci/yds.c index 849a6ac5595..1311c3c6ec5 100644 --- a/sys/dev/pci/yds.c +++ b/sys/dev/pci/yds.c @@ -1,4 +1,4 @@ -/* $OpenBSD: yds.c,v 1.40 2012/01/11 16:22:33 dhill Exp $ */ +/* $OpenBSD: yds.c,v 1.41 2012/03/03 20:21:39 miod Exp $ */ /* $NetBSD: yds.c,v 1.5 2001/05/21 23:55:04 minoura Exp $ */ /* @@ -677,13 +677,13 @@ yds_attach(struct device *parent, struct device *self, void *aux) /* Map register to memory */ if (pci_mapreg_map(pa, YDS_PCI_MBA, PCI_MAPREG_TYPE_MEM, 0, &sc->memt, &sc->memh, NULL, &size, 0)) { - printf("%s: can't map mem space\n", sc->sc_dev.dv_xname); + printf(": can't map mem space\n"); return; } /* Map and establish the interrupt. */ if (pci_intr_map(pa, &ih)) { - printf("%s: couldn't map interrupt\n", sc->sc_dev.dv_xname); + printf(": couldn't map interrupt\n"); bus_space_unmap(sc->memt, sc->memh, size); return; } @@ -691,8 +691,7 @@ yds_attach(struct device *parent, struct device *self, void *aux) sc->sc_ih = pci_intr_establish(pc, ih, IPL_AUDIO, yds_intr, sc, self->dv_xname); if (sc->sc_ih == NULL) { - printf("%s: couldn't establish interrupt", - sc->sc_dev.dv_xname); + printf(": couldn't establish interrupt"); if (intrstr != NULL) printf(" at %s", intrstr); printf("\n"); |