diff options
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/hp300/dev/apci.c | 3 | ||||
-rw-r--r-- | sys/arch/hp300/dev/dca.c | 3 | ||||
-rw-r--r-- | sys/arch/hp300/dev/dcm.c | 4 | ||||
-rw-r--r-- | sys/arch/hp300/hp300/wscons_machdep.c | 3 | ||||
-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 | ||||
-rw-r--r-- | sys/arch/i386/isa/pccom.c | 10 | ||||
-rw-r--r-- | sys/arch/macppc/macppc/ofw_machdep.c | 3 | ||||
-rw-r--r-- | sys/arch/macppc/pci/vgafb.c | 6 | ||||
-rw-r--r-- | sys/arch/mvme68k/dev/bugtty.c | 6 | ||||
-rw-r--r-- | sys/arch/mvme68k/dev/cl.c | 3 | ||||
-rw-r--r-- | sys/arch/mvme68k/dev/zs.c | 3 | ||||
-rw-r--r-- | sys/arch/mvme88k/dev/cl.c | 4 | ||||
-rw-r--r-- | sys/arch/mvme88k/dev/dart.c | 4 | ||||
-rw-r--r-- | sys/arch/vax/qbus/qd.c | 4 | ||||
-rw-r--r-- | sys/arch/vax/vax/dzcons.c | 5 | ||||
-rw-r--r-- | sys/arch/vax/vax/gencons.c | 5 | ||||
-rw-r--r-- | sys/arch/vax/vsa/dz_ibus.c | 3 | ||||
-rw-r--r-- | sys/dev/cons.h | 8 | ||||
-rw-r--r-- | sys/dev/ic/com.c | 14 |
21 files changed, 35 insertions, 74 deletions
diff --git a/sys/arch/hp300/dev/apci.c b/sys/arch/hp300/dev/apci.c index 2540cfc15a6..262ed14b345 100644 --- a/sys/arch/hp300/dev/apci.c +++ b/sys/arch/hp300/dev/apci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: apci.c,v 1.27 2005/12/30 18:14:09 miod Exp $ */ +/* $OpenBSD: apci.c,v 1.28 2006/01/01 11:59:37 miod Exp $ */ /* $NetBSD: apci.c,v 1.9 2000/11/02 00:35:05 eeh Exp $ */ /*- @@ -887,7 +887,6 @@ apcicnprobe(cp) /* initialize the required fields */ cp->cn_dev = makedev(apcimajor, 0); /* XXX */ - cp->cn_pri = CN_DEAD; /* * The APCI can only be a console on a 425e; on other 4xx diff --git a/sys/arch/hp300/dev/dca.c b/sys/arch/hp300/dev/dca.c index 12598c21fdc..a9c976b5297 100644 --- a/sys/arch/hp300/dev/dca.c +++ b/sys/arch/hp300/dev/dca.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dca.c,v 1.30 2005/12/31 18:13:41 miod Exp $ */ +/* $OpenBSD: dca.c,v 1.31 2006/01/01 11:59:37 miod Exp $ */ /* $NetBSD: dca.c,v 1.35 1997/05/05 20:58:18 thorpej Exp $ */ /* @@ -1044,7 +1044,6 @@ dcacnprobe(cp) /* initialize required fields */ cp->cn_dev = makedev(dcamajor, 0); /* XXX */ - cp->cn_pri = CN_DEAD; console_scan(dca_console_scan, cp); diff --git a/sys/arch/hp300/dev/dcm.c b/sys/arch/hp300/dev/dcm.c index 206f3da52e9..d71c193b270 100644 --- a/sys/arch/hp300/dev/dcm.c +++ b/sys/arch/hp300/dev/dcm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dcm.c,v 1.27 2005/12/31 18:13:41 miod Exp $ */ +/* $OpenBSD: dcm.c,v 1.28 2006/01/01 11:59:37 miod Exp $ */ /* $NetBSD: dcm.c,v 1.41 1997/05/05 20:59:16 thorpej Exp $ */ /* @@ -123,7 +123,6 @@ struct dcmischeme { */ static struct dcmdevice *dcm_cn = NULL; /* pointer to hardware */ static int dcmconsinit; /* has been initialized */ -/* static int dcm_lastcnpri = CN_DEAD; */ /* XXX last priority */ int dcmdefaultrate = DEFAULT_BAUD_RATE; int dcmconbrdbusy = 0; @@ -1555,7 +1554,6 @@ dcmcnprobe(cp) /* initialize required fields */ cp->cn_dev = makedev(dcmmajor, 0); /* XXX */ - cp->cn_pri = CN_DEAD; console_scan(dcm_console_scan, cp); diff --git a/sys/arch/hp300/hp300/wscons_machdep.c b/sys/arch/hp300/hp300/wscons_machdep.c index 4300eda7173..b0f17e17042 100644 --- a/sys/arch/hp300/hp300/wscons_machdep.c +++ b/sys/arch/hp300/hp300/wscons_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wscons_machdep.c,v 1.5 2005/12/31 18:13:44 miod Exp $ */ +/* $OpenBSD: wscons_machdep.c,v 1.6 2006/01/01 11:59:39 miod Exp $ */ /* * Copyright (c) 2005, Miodrag Vallat @@ -179,7 +179,6 @@ wscnprobe(struct consdev *cp) } cp->cn_dev = makedev(maj, 0); - cp->cn_pri = CN_DEAD; wsfbcninit = NULL; #if NDVBOX > 0 || NGBOX > 0 || NRBOX > 0 || NTOPCAT > 0 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; } 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++) diff --git a/sys/arch/macppc/macppc/ofw_machdep.c b/sys/arch/macppc/macppc/ofw_machdep.c index 4258585c8ed..7ace6b09192 100644 --- a/sys/arch/macppc/macppc/ofw_machdep.c +++ b/sys/arch/macppc/macppc/ofw_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ofw_machdep.c,v 1.27 2005/12/17 07:31:26 miod Exp $ */ +/* $OpenBSD: ofw_machdep.c,v 1.28 2006/01/01 11:59:39 miod Exp $ */ /* $NetBSD: ofw_machdep.c,v 1.1 1996/09/30 16:34:50 ws Exp $ */ /* @@ -633,7 +633,6 @@ cons_decl(ofw); void ofwcnprobe(struct consdev *cd) { - cd->cn_pri = CN_DEAD; } void diff --git a/sys/arch/macppc/pci/vgafb.c b/sys/arch/macppc/pci/vgafb.c index 58a66e7f030..6127243d98d 100644 --- a/sys/arch/macppc/pci/vgafb.c +++ b/sys/arch/macppc/pci/vgafb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vgafb.c,v 1.26 2005/10/26 18:57:51 martin Exp $ */ +/* $OpenBSD: vgafb.c,v 1.27 2006/01/01 11:59:39 miod Exp $ */ /* $NetBSD: vga.c,v 1.3 1996/12/02 22:24:54 cgd Exp $ */ /* @@ -373,10 +373,8 @@ vgafb_mmap(void *v, off_t offset, int prot) void vgafb_cnprobe(struct consdev *cp) { - if (cons_displaytype != 1) { - cp->cn_pri = CN_DEAD; + if (cons_displaytype != 1) return; - } cp->cn_pri = CN_INTERNAL; } diff --git a/sys/arch/mvme68k/dev/bugtty.c b/sys/arch/mvme68k/dev/bugtty.c index fb70eef3791..9ad515c9e5b 100644 --- a/sys/arch/mvme68k/dev/bugtty.c +++ b/sys/arch/mvme68k/dev/bugtty.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bugtty.c,v 1.13 2004/07/31 22:27:34 miod Exp $ */ +/* $OpenBSD: bugtty.c,v 1.14 2006/01/01 11:59:39 miod Exp $ */ /* * Copyright (c) 1995 Dale Rahn. @@ -445,10 +445,8 @@ bugttycnprobe(cp) int maj; extern int needprom; - if (needprom == 0) { - cp->cn_pri = CN_DEAD; + if (needprom == 0) return; - } /* locate the major number */ for (maj = 0; maj < nchrdev; maj++) diff --git a/sys/arch/mvme68k/dev/cl.c b/sys/arch/mvme68k/dev/cl.c index af78492f3d2..85a2f6a322b 100644 --- a/sys/arch/mvme68k/dev/cl.c +++ b/sys/arch/mvme68k/dev/cl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cl.c,v 1.41 2005/11/24 22:43:16 miod Exp $ */ +/* $OpenBSD: cl.c,v 1.42 2006/01/01 11:59:39 miod Exp $ */ /* * Copyright (c) 1995 Dale Rahn. All rights reserved. @@ -931,7 +931,6 @@ clcnprobe(cp) case CPU_177: break; default: - cp->cn_pri = CN_DEAD; return; } diff --git a/sys/arch/mvme68k/dev/zs.c b/sys/arch/mvme68k/dev/zs.c index 9a607d5ef32..d68ca8bac59 100644 --- a/sys/arch/mvme68k/dev/zs.c +++ b/sys/arch/mvme68k/dev/zs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: zs.c,v 1.22 2005/11/24 22:43:16 miod Exp $ */ +/* $OpenBSD: zs.c,v 1.23 2006/01/01 11:59:39 miod Exp $ */ /* * Copyright (c) 2000 Steve Murphree, Jr. @@ -1002,7 +1002,6 @@ zscnprobe(cp) case CPU_172: break; default: - cp->cn_pri = CN_DEAD; return; } diff --git a/sys/arch/mvme88k/dev/cl.c b/sys/arch/mvme88k/dev/cl.c index f74f056b2d7..78c7de302cf 100644 --- a/sys/arch/mvme88k/dev/cl.c +++ b/sys/arch/mvme88k/dev/cl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cl.c,v 1.49 2005/01/25 12:13:22 miod Exp $ */ +/* $OpenBSD: cl.c,v 1.50 2006/01/01 11:59:39 miod Exp $ */ /* * Copyright (c) 1995 Dale Rahn. All rights reserved. @@ -886,8 +886,6 @@ clcnprobe(cp) { int maj; - cp->cn_pri = CN_DEAD; - /* bomb if it'a a MVME188 */ if (brdtyp == BRD_188 || badaddr(CD2400_BASE_ADDR, 1) != 0) return; diff --git a/sys/arch/mvme88k/dev/dart.c b/sys/arch/mvme88k/dev/dart.c index 9cebc3f5f1c..a5c7f9914bb 100644 --- a/sys/arch/mvme88k/dev/dart.c +++ b/sys/arch/mvme88k/dev/dart.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dart.c,v 1.44 2005/10/13 19:48:34 miod Exp $ */ +/* $OpenBSD: dart.c,v 1.45 2006/01/01 11:59:39 miod Exp $ */ /* * Mach Operating System @@ -1154,8 +1154,6 @@ dartcnprobe(cp) { int maj; - cp->cn_pri = CN_DEAD; - if (brdtyp != BRD_188 || badaddr(DART_BASE, 2) != 0) return; diff --git a/sys/arch/vax/qbus/qd.c b/sys/arch/vax/qbus/qd.c index 3a366171bd5..431e0e614ba 100644 --- a/sys/arch/vax/qbus/qd.c +++ b/sys/arch/vax/qbus/qd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: qd.c,v 1.10 2003/11/10 21:05:06 miod Exp $ */ +/* $OpenBSD: qd.c,v 1.11 2006/01/01 11:59:39 miod Exp $ */ /* $NetBSD: qd.c,v 1.17 2000/01/24 02:40:29 matt Exp $ */ /*- @@ -429,8 +429,6 @@ qdcnprobe(cndev) { int i; - cndev->cn_pri = CN_DEAD; - if (mfpr(PR_MAPEN) == 0) return; /* Cannot use qd if vm system is OFF */ diff --git a/sys/arch/vax/vax/dzcons.c b/sys/arch/vax/vax/dzcons.c index 9deb9be3e37..fa3aa3ca8f6 100644 --- a/sys/arch/vax/vax/dzcons.c +++ b/sys/arch/vax/vax/dzcons.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dzcons.c,v 1.5 2002/03/14 03:16:02 millert Exp $ */ +/* $OpenBSD: dzcons.c,v 1.6 2006/01/01 11:59:40 miod Exp $ */ /* $NetBSD: dzcons.c,v 1.5 1997/03/22 12:51:01 ragge Exp $ */ /* * Copyright (c) 1994 Gordon W. Ross @@ -304,7 +304,6 @@ dzcnprobe(cndev) break; default: - cndev->cn_pri = CN_DEAD; return; } @@ -314,8 +313,6 @@ dzcnprobe(cndev) cndev->cn_pri = CN_NORMAL; return; } - cndev->cn_pri = CN_DEAD; - return; } int diff --git a/sys/arch/vax/vax/gencons.c b/sys/arch/vax/vax/gencons.c index 6e031c347fb..e76d5adb724 100644 --- a/sys/arch/vax/vax/gencons.c +++ b/sys/arch/vax/vax/gencons.c @@ -1,4 +1,4 @@ -/* $OpenBSD: gencons.c,v 1.15 2003/06/26 13:06:26 miod Exp $ */ +/* $OpenBSD: gencons.c,v 1.16 2006/01/01 11:59:40 miod Exp $ */ /* $NetBSD: gencons.c,v 1.22 2000/01/24 02:40:33 matt Exp $ */ /* @@ -262,8 +262,7 @@ gencnprobe(struct consdev *cndev) (vax_boardtype == VAX_BTYP_1305)) { cndev->cn_dev = makedev(25, 0); cndev->cn_pri = CN_NORMAL; - } else - cndev->cn_pri = CN_DEAD; + } } void diff --git a/sys/arch/vax/vsa/dz_ibus.c b/sys/arch/vax/vsa/dz_ibus.c index 11ffbf38976..076c1e4f4af 100644 --- a/sys/arch/vax/vsa/dz_ibus.c +++ b/sys/arch/vax/vsa/dz_ibus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dz_ibus.c,v 1.12 2004/07/07 23:10:46 deraadt Exp $ */ +/* $OpenBSD: dz_ibus.c,v 1.13 2006/01/01 11:59:40 miod Exp $ */ /* $NetBSD: dz_ibus.c,v 1.15 1999/08/27 17:50:42 ragge Exp $ */ /* * Copyright (c) 1998 Ludd, University of Lule}, Sweden. @@ -272,7 +272,6 @@ dzcnprobe(cndev) break; default: - cndev->cn_pri = CN_DEAD; return; } if (diagcons) diff --git a/sys/dev/cons.h b/sys/dev/cons.h index 50aa1ae709e..cc729e6c2da 100644 --- a/sys/dev/cons.h +++ b/sys/dev/cons.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cons.h,v 1.14 2005/12/30 18:08:12 miod Exp $ */ +/* $OpenBSD: cons.h,v 1.15 2006/01/01 11:59:40 miod Exp $ */ /* $NetBSD: cons.h,v 1.14 1996/03/14 19:08:35 christos Exp $ */ /* @@ -103,10 +103,12 @@ void nullcnpollc(dev_t, int); #define cons_init(n) { \ dev_init(1,n,cnprobe), dev_init(1,n,cninit), dev_init(1,n,cngetc), \ - dev_init(1,n,cnputc), dev_init(1,n,cnpollc) } + dev_init(1,n,cnputc), dev_init(1,n,cnpollc), NULL, \ + NODEV, CN_DEAD } #define cons_init_bell(n) { \ dev_init(1,n,cnprobe), dev_init(1,n,cninit), dev_init(1,n,cngetc), \ - dev_init(1,n,cnputc), dev_init(1,n,cnpollc), dev_init(1,n,cnbell) } + dev_init(1,n,cnputc), dev_init(1,n,cnpollc), dev_init(1,n,cnbell), \ + NODEV, CN_DEAD } #endif diff --git a/sys/dev/ic/com.c b/sys/dev/ic/com.c index 9d1cb63e9bc..2314b4205ac 100644 --- a/sys/dev/ic/com.c +++ b/sys/dev/ic/com.c @@ -1,4 +1,4 @@ -/* $OpenBSD: com.c,v 1.108 2005/11/21 18:16:39 millert Exp $ */ +/* $OpenBSD: com.c,v 1.109 2006/01/01 11:59:40 miod Exp $ */ /* $NetBSD: com.c,v 1.82.4.1 1996/06/02 09:08:00 mrg Exp $ */ /* @@ -1372,26 +1372,20 @@ comcnprobe(cp) bus_space_handle_t ioh; int found; - if(CONADDR == 0) { - cp->cn_pri = CN_DEAD; + if (CONADDR == 0) return; - } comconsiot = iot; - 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; - } #ifdef __hppa__ found = 1; #else found = comprobe1(iot, ioh); #endif 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++) |