summaryrefslogtreecommitdiff
path: root/sys/arch/sparc64
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2003-10-03 16:44:52 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2003-10-03 16:44:52 +0000
commit24c386b577f126bce761c7288e987ae93c36aa88 (patch)
tree99166e0d499a2be11543cc5dd9774c63a12466eb /sys/arch/sparc64
parente43c66ff4e929d0beb6716fb882523dc136b8c0c (diff)
Merge tty_attach() in ttymalloc() and tty_detach() in ttyfree(). The need for
separate tty registering is gone now that sparc has switched to wscons, and this makes the code less error-prone. Also, remove tests for ttymalloc() failure, since it uses M_WAITOK. ok millert@ deraadt@, tested by various people as well besides me...
Diffstat (limited to 'sys/arch/sparc64')
-rw-r--r--sys/arch/sparc64/dev/pcons.c3
-rw-r--r--sys/arch/sparc64/dev/sab.c7
-rw-r--r--sys/arch/sparc64/dev/z8530tty.c3
3 files changed, 3 insertions, 10 deletions
diff --git a/sys/arch/sparc64/dev/pcons.c b/sys/arch/sparc64/dev/pcons.c
index d2a503d0484..147ff99cecb 100644
--- a/sys/arch/sparc64/dev/pcons.c
+++ b/sys/arch/sparc64/dev/pcons.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pcons.c,v 1.6 2003/08/15 20:32:15 tedu Exp $ */
+/* $OpenBSD: pcons.c,v 1.7 2003/10/03 16:44:50 miod Exp $ */
/* $NetBSD: pcons.c,v 1.7 2001/05/02 10:32:20 scw Exp $ */
/*-
@@ -176,7 +176,6 @@ pconsopen(dev, flag, mode, p)
return ENXIO;
if (!(tp = sc->of_tty)) {
sc->of_tty = tp = ttymalloc();
- tty_attach(tp);
}
tp->t_oproc = pconsstart;
tp->t_param = pconsparam;
diff --git a/sys/arch/sparc64/dev/sab.c b/sys/arch/sparc64/dev/sab.c
index 14250d7f600..a0475fd0cda 100644
--- a/sys/arch/sparc64/dev/sab.c
+++ b/sys/arch/sparc64/dev/sab.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sab.c,v 1.14 2003/08/15 20:32:15 tedu Exp $ */
+/* $OpenBSD: sab.c,v 1.15 2003/10/03 16:44:50 miod Exp $ */
/*
* Copyright (c) 2001 Jason L. Wright (jason@thought.net)
@@ -377,11 +377,6 @@ sabtty_attach(parent, self, aux)
int r;
sc->sc_tty = ttymalloc();
- if (sc->sc_tty == NULL) {
- printf(": failed to allocate tty\n");
- return;
- }
- tty_attach(sc->sc_tty);
sc->sc_tty->t_oproc = sabtty_start;
sc->sc_tty->t_param = sabtty_param;
diff --git a/sys/arch/sparc64/dev/z8530tty.c b/sys/arch/sparc64/dev/z8530tty.c
index a7c597e22bd..24da5aed7cd 100644
--- a/sys/arch/sparc64/dev/z8530tty.c
+++ b/sys/arch/sparc64/dev/z8530tty.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: z8530tty.c,v 1.8 2003/08/15 20:32:15 tedu Exp $ */
+/* $OpenBSD: z8530tty.c,v 1.9 2003/10/03 16:44:50 miod Exp $ */
/* $NetBSD: z8530tty.c,v 1.77 2001/05/30 15:24:24 lukem Exp $ */
/*-
@@ -340,7 +340,6 @@ zstty_attach(parent, self, aux)
tp->t_oproc = zsstart;
tp->t_param = zsparam;
tp->t_hwiflow = zshwiflow;
- tty_attach(tp);
zst->zst_tty = tp;
zst->zst_rbuf = malloc(zstty_rbuf_size << 1, M_DEVBUF, M_WAITOK);