diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2006-01-01 11:59:41 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2006-01-01 11:59:41 +0000 |
commit | 7c8c17745187f3a98406bb29f524367c37916e73 (patch) | |
tree | 30dad47898ee31fcbac0fb74a5c5ddccaf8ce36f /sys/arch/i386 | |
parent | 2d6ec71dd3850b256841848bec15fcbbadd35579 (diff) |
Let cons_init() and cons_init_bell() initialize the whole consdev structure,
thus removing the need for drivers to initialize cn_pri to CN_DEAD when
hardware probe fails.
Diffstat (limited to 'sys/arch/i386')
-rw-r--r-- | sys/arch/i386/isa/pccom.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/sys/arch/i386/isa/pccom.c b/sys/arch/i386/isa/pccom.c index 4866deb63e1..e3e97510158 100644 --- a/sys/arch/i386/isa/pccom.c +++ b/sys/arch/i386/isa/pccom.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pccom.c,v 1.49 2005/11/21 18:16:36 millert Exp $ */ +/* $OpenBSD: pccom.c,v 1.50 2006/01/01 11:59:39 miod Exp $ */ /* $NetBSD: com.c,v 1.82.4.1 1996/06/02 09:08:00 mrg Exp $ */ /* @@ -1532,16 +1532,12 @@ comcnprobe(cp) bus_space_handle_t ioh; int found; - if (bus_space_map(iot, CONADDR, COM_NPORTS, 0, &ioh)) { - cp->cn_pri = CN_DEAD; + if (bus_space_map(iot, CONADDR, COM_NPORTS, 0, &ioh)) return; - } found = comprobe1(iot, ioh); bus_space_unmap(iot, ioh, COM_NPORTS); - if (!found) { - cp->cn_pri = CN_DEAD; + if (!found) return; - } /* locate the major number */ for (commajor = 0; commajor < nchrdev; commajor++) |