diff options
author | phk <phk@FreeBSD.org> | 1999-08-08 20:25:14 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 1999-08-08 20:25:14 +0000 |
commit | 0c67d78c0dbeb20346e56e674d9875d6d0cec069 (patch) | |
tree | 5972a115b1c9bf4b993129722955e0cd1fe2fe61 /sys/isa | |
parent | 133bb37bf5edbb137a7db3d4ac2b32dced8dac3b (diff) | |
download | FreeBSD-src-0c67d78c0dbeb20346e56e674d9875d6d0cec069.zip FreeBSD-src-0c67d78c0dbeb20346e56e674d9875d6d0cec069.tar.gz |
Allocate and register struct tty on the fly.
Diffstat (limited to 'sys/isa')
-rw-r--r-- | sys/isa/sio.c | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/sys/isa/sio.c b/sys/isa/sio.c index cf3aa51..d36318d 100644 --- a/sys/isa/sio.c +++ b/sys/isa/sio.c @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: sio.c,v 1.251 1999/06/29 17:34:16 yokota Exp $ + * $Id: sio.c,v 1.252 1999/07/04 14:58:35 phk Exp $ * from: @(#)com.c 7.5 (Berkeley) 5/16/91 * from: i386/isa sio.c,v 1.234 */ @@ -398,12 +398,6 @@ static int sio_timeout; static int sio_timeouts_until_log; static struct callout_handle sio_timeout_handle = CALLOUT_HANDLE_INITIALIZER(&sio_timeout_handle); -#if 0 /* XXX */ -static struct tty *sio_tty[NSIOTOT]; -#else -static struct tty sio_tty[NSIOTOT]; -#endif -static const int nsio_tty = NSIOTOT; static struct speedtab comspeedtab[] = { { 0, 0 }, @@ -1186,11 +1180,7 @@ sioopen(dev, flag, mode, p) return (ENXIO); if (mynor & CONTROL_MASK) return (0); -#if 0 /* XXX */ - tp = com->tp = sio_tty[unit] = ttymalloc(sio_tty[unit]); -#else - tp = com->tp = &sio_tty[unit]; -#endif + tp = dev->si_tty_tty = com->tp = ttymalloc(com->tp); s = spltty(); /* * We jump to this label after all non-interrupted sleeps to pick @@ -2461,7 +2451,7 @@ siodevtotty(dev) unit = MINOR_TO_UNIT(mynor); if ((u_int) unit >= NSIOTOT) return (NULL); - return (&sio_tty[unit]); + return (dev->si_tty_tty); } static int |