diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2003-10-03 16:44:52 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2003-10-03 16:44:52 +0000 |
commit | 24c386b577f126bce761c7288e987ae93c36aa88 (patch) | |
tree | 99166e0d499a2be11543cc5dd9774c63a12466eb /sys/dev/sbus | |
parent | e43c66ff4e929d0beb6716fb882523dc136b8c0c (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/dev/sbus')
-rw-r--r-- | sys/dev/sbus/magma.c | 5 | ||||
-rw-r--r-- | sys/dev/sbus/spif.c | 5 |
2 files changed, 2 insertions, 8 deletions
diff --git a/sys/dev/sbus/magma.c b/sys/dev/sbus/magma.c index 222d1860015..d210b651354 100644 --- a/sys/dev/sbus/magma.c +++ b/sys/dev/sbus/magma.c @@ -1,4 +1,4 @@ -/* $OpenBSD: magma.c,v 1.12 2003/09/23 16:51:12 millert Exp $ */ +/* $OpenBSD: magma.c,v 1.13 2003/10/03 16:44:51 miod Exp $ */ /* * magma.c * @@ -814,9 +814,6 @@ mtty_attach(struct device *parent, struct device *dev, void *args) 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/dev/sbus/spif.c b/sys/dev/sbus/spif.c index 1bcbd07e547..b83cf859451 100644 --- a/sys/dev/sbus/spif.c +++ b/sys/dev/sbus/spif.c @@ -1,4 +1,4 @@ -/* $OpenBSD: spif.c,v 1.11 2003/09/23 16:51:12 millert Exp $ */ +/* $OpenBSD: spif.c,v 1.12 2003/10/03 16:44:51 miod Exp $ */ /* * Copyright (c) 1999-2002 Jason L. Wright (jason@thought.net) @@ -312,9 +312,6 @@ sttyattach(parent, dev, aux) DTR_WRITE(sc, port, 0); tp = ttymalloc(); - if (tp == NULL) - break; - tty_attach(tp); tp->t_oproc = stty_start; tp->t_param = stty_param; |