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/hp300/stand/common | |
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/hp300/stand/common')
-rw-r--r-- | sys/arch/hp300/stand/common/apci.c | 4 | ||||
-rw-r--r-- | sys/arch/hp300/stand/common/dca.c | 7 | ||||
-rw-r--r-- | sys/arch/hp300/stand/common/dcm.c | 7 |
3 files changed, 5 insertions, 13 deletions
diff --git a/sys/arch/hp300/stand/common/apci.c b/sys/arch/hp300/stand/common/apci.c index a4556efc27c..f3e837c9d87 100644 --- a/sys/arch/hp300/stand/common/apci.c +++ b/sys/arch/hp300/stand/common/apci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: apci.c,v 1.6 2005/12/31 17:59:47 miod Exp $ */ +/* $OpenBSD: apci.c,v 1.7 2006/01/01 11:59:39 miod Exp $ */ /* $NetBSD: apci.c,v 1.2 1997/10/04 17:20:15 thorpej Exp $ */ /*- @@ -92,8 +92,6 @@ apciprobe(cp) { volatile u_int8_t *frodoregs; - cp->cn_pri = CN_DEAD; - /* * Only a 425e can have an APCI console. On all other 4xx models, * the "first" serial port is mapped to the DCA at select code 9. diff --git a/sys/arch/hp300/stand/common/dca.c b/sys/arch/hp300/stand/common/dca.c index 463f37ac5ab..6603d1475bc 100644 --- a/sys/arch/hp300/stand/common/dca.c +++ b/sys/arch/hp300/stand/common/dca.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dca.c,v 1.4 2005/12/31 17:59:47 miod Exp $ */ +/* $OpenBSD: dca.c,v 1.5 2006/01/01 11:59:39 miod Exp $ */ /* $NetBSD: dca.c,v 1.10 1996/10/06 01:42:48 mycroft Exp $ */ /* @@ -63,10 +63,8 @@ dcaprobe(cp) register struct dcadevice *dca; dcacnaddr = (struct dcadevice *) sctoaddr(DCACONSCODE); - if (badaddr((char *)dcacnaddr)) { - cp->cn_pri = CN_DEAD; + if (badaddr((char *)dcacnaddr)) return; - } dca = dcacnaddr; switch (dca->dca_id) { @@ -79,7 +77,6 @@ dcaprobe(cp) cp->cn_pri = CN_REMOTE; break; default: - cp->cn_pri = CN_DEAD; break; } diff --git a/sys/arch/hp300/stand/common/dcm.c b/sys/arch/hp300/stand/common/dcm.c index 14579f1d22a..2d11221b211 100644 --- a/sys/arch/hp300/stand/common/dcm.c +++ b/sys/arch/hp300/stand/common/dcm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dcm.c,v 1.3 2005/12/31 17:59:47 miod Exp $ */ +/* $OpenBSD: dcm.c,v 1.4 2006/01/01 11:59:39 miod Exp $ */ /* $NetBSD: dcm.c,v 1.2 1997/04/14 05:58:32 scottr Exp $ */ /* @@ -62,10 +62,8 @@ dcmprobe(cp) for (hw = sc_table; hw < &sc_table[MAXCTLRS]; hw++) if (HW_ISDEV(hw, D_COMMDCM) && !badaddr((caddr_t)hw->hw_kva)) break; - if (!HW_ISDEV(hw, D_COMMDCM)) { - cp->cn_pri = CN_DEAD; + if (!HW_ISDEV(hw, D_COMMDCM)) return; - } dcmcnaddr = (struct dcmdevice *) hw->hw_kva; dcm = dcmcnaddr; @@ -77,7 +75,6 @@ dcmprobe(cp) cp->cn_pri = CN_REMOTE; break; default: - cp->cn_pri = CN_DEAD; break; } |