add tty_attach() calls where appropriate
This commit is contained in:
parent
08d585e924
commit
6e6fc14f32
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: promcons.c,v 1.2 1995/06/28 02:45:19 cgd Exp $ */
|
||||
/* $NetBSD: promcons.c,v 1.3 1996/05/30 18:44:30 cgd Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994, 1995 Carnegie-Mellon University.
|
||||
|
@ -64,9 +64,10 @@ promopen(dev, flag, mode, p)
|
|||
|
||||
s = spltty();
|
||||
|
||||
if (!prom_tty[unit])
|
||||
if (!prom_tty[unit]) {
|
||||
tp = prom_tty[unit] = ttymalloc();
|
||||
else
|
||||
tty_attach(tp);
|
||||
} else
|
||||
tp = prom_tty[unit];
|
||||
|
||||
tp->t_oproc = promstart;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: scc.c,v 1.16 1996/04/29 14:48:25 cgd Exp $ */
|
||||
/* $NetBSD: scc.c,v 1.17 1996/05/30 18:44:40 cgd Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1991,1990,1989,1994,1995,1996 Carnegie Mellon University
|
||||
|
@ -305,6 +305,7 @@ sccattach(parent, self, aux)
|
|||
for (cntr = 0; cntr < 2; cntr++) {
|
||||
pdp->p_addr = (void *)sccaddr;
|
||||
tp = scc_tty[sc->sc_dv.dv_unit * 2 + cntr] = ttymalloc();
|
||||
tty_attach(tp);
|
||||
pdp->p_arg = (long)tp;
|
||||
pdp->p_fcn = (void (*)())0;
|
||||
tp->t_dev = (dev_t)((sc->sc_dv.dv_unit << 1) | cntr);
|
||||
|
@ -473,8 +474,10 @@ sccopen(dev, flag, mode, p)
|
|||
if (sc->scc_pdma[line].p_addr == NULL)
|
||||
return (ENXIO);
|
||||
tp = scc_tty[minor(dev)];
|
||||
if (tp == NULL)
|
||||
if (tp == NULL) {
|
||||
tp = scc_tty[minor(dev)] = ttymalloc();
|
||||
tty_attach(tp);
|
||||
}
|
||||
tp->t_oproc = sccstart;
|
||||
tp->t_param = sccparam;
|
||||
tp->t_dev = dev;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: wscons.c,v 1.3 1996/04/17 21:48:30 cgd Exp $ */
|
||||
/* $NetBSD: wscons.c,v 1.4 1996/05/30 18:44:51 cgd Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995, 1996 Carnegie-Mellon University.
|
||||
|
@ -175,6 +175,7 @@ wsconsattach(parent, self, aux)
|
|||
* Set up the device's tty structure.
|
||||
*/
|
||||
sc->sc_tty = ttymalloc();
|
||||
tty_attach(sc->sc_tty);
|
||||
|
||||
/*
|
||||
* Record other relevant information: ioctl and mmap functions.
|
||||
|
|
Loading…
Reference in New Issue