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/usb/ucom.c | |
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/usb/ucom.c')
-rw-r--r-- | sys/dev/usb/ucom.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/dev/usb/ucom.c b/sys/dev/usb/ucom.c index 5bfb473a61d..85f48b50e2f 100644 --- a/sys/dev/usb/ucom.c +++ b/sys/dev/usb/ucom.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ucom.c,v 1.19 2003/08/15 20:32:18 tedu Exp $ */ +/* $OpenBSD: ucom.c,v 1.20 2003/10/03 16:44:51 miod Exp $ */ /* $NetBSD: ucom.c,v 1.49 2003/01/01 00:10:25 thorpej Exp $ */ /* @@ -211,8 +211,10 @@ USB_ATTACH(ucom) tp->t_param = ucomparam; sc->sc_tty = tp; +#ifndef __OpenBSD__ DPRINTF(("ucom_attach: tty_attach %p\n", tp)); tty_attach(tp); +#endif #if defined(__NetBSD__) && NRND > 0 rnd_attach_source(&sc->sc_rndsource, USBDEVNAME(sc->sc_dev), @@ -271,7 +273,9 @@ USB_DETACH(ucom) /* Detach and free the tty. */ if (tp != NULL) { +#ifndef __OpenBSD__ tty_detach(tp); +#endif ttyfree(tp); sc->sc_tty = NULL; } |