summaryrefslogtreecommitdiff
path: root/sys/arch/sparc/dev
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/sparc/dev
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/sparc/dev')
-rw-r--r--sys/arch/sparc/dev/magma.c4
-rw-r--r--sys/arch/sparc/dev/spif.c5
-rw-r--r--sys/arch/sparc/dev/z8530tty.c3
3 files changed, 3 insertions, 9 deletions
diff --git a/sys/arch/sparc/dev/magma.c b/sys/arch/sparc/dev/magma.c
index d6c52594442..10744180248 100644
--- a/sys/arch/sparc/dev/magma.c
+++ b/sys/arch/sparc/dev/magma.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: magma.c,v 1.16 2003/09/23 16:51:11 millert Exp $ */
+/* $OpenBSD: magma.c,v 1.17 2003/10/03 16:44:50 miod Exp $ */
/*
* magma.c
*
@@ -845,8 +845,6 @@ int port, chip, chan;
mp->mp_channel = chan;
tp = ttymalloc();
- if( tp == NULL ) break;
- tty_attach(tp);
tp->t_oproc = mtty_start;
tp->t_param = mtty_param;
diff --git a/sys/arch/sparc/dev/spif.c b/sys/arch/sparc/dev/spif.c
index 6642bcc5d81..9cc917732be 100644
--- a/sys/arch/sparc/dev/spif.c
+++ b/sys/arch/sparc/dev/spif.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: spif.c,v 1.17 2003/09/23 16:51:11 millert Exp $ */
+/* $OpenBSD: spif.c,v 1.18 2003/10/03 16:44:50 miod Exp $ */
/*
* Copyright (c) 1999 Jason L. Wright (jason@thought.net)
@@ -249,9 +249,6 @@ sttyattach(parent, dev, aux)
sc->sc_regs->dtrlatch[port] = 1;
tp = ttymalloc();
- if (tp == NULL)
- break;
- tty_attach(tp);
tp->t_oproc = stty_start;
tp->t_param = stty_param;
diff --git a/sys/arch/sparc/dev/z8530tty.c b/sys/arch/sparc/dev/z8530tty.c
index d9e0f119b63..d3ef26a3329 100644
--- a/sys/arch/sparc/dev/z8530tty.c
+++ b/sys/arch/sparc/dev/z8530tty.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: z8530tty.c,v 1.3 2003/08/15 20:32:14 tedu Exp $ */
+/* $OpenBSD: z8530tty.c,v 1.4 2003/10/03 16:44:50 miod Exp $ */
/* $NetBSD: z8530tty.c,v 1.13 1996/10/16 20:42:14 gwr Exp $ */
/*-
@@ -343,7 +343,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);