From 08d585e92443369fb9c1f827a5b09e486e1e0526 Mon Sep 17 00:00:00 2001 From: cgd Date: Thu, 30 May 1996 18:24:09 +0000 Subject: [PATCH] add tty_attach() where appropriate. --- sys/dev/ic/com.c | 7 ++++--- sys/dev/isa/com.c | 7 ++++--- sys/dev/isa/cy.c | 6 ++++-- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/sys/dev/ic/com.c b/sys/dev/ic/com.c index b77194cdb2da..d9b909af1127 100644 --- a/sys/dev/ic/com.c +++ b/sys/dev/ic/com.c @@ -1,4 +1,4 @@ -/* $NetBSD: com.c,v 1.82 1996/05/12 23:52:00 mycroft Exp $ */ +/* $NetBSD: com.c,v 1.83 1996/05/30 18:24:09 cgd Exp $ */ /*- * Copyright (c) 1993, 1994, 1995, 1996 @@ -528,9 +528,10 @@ comopen(dev, flag, mode, p) if (!sc) return ENXIO; - if (!sc->sc_tty) + if (!sc->sc_tty) { tp = sc->sc_tty = ttymalloc(); - else + tty_attach(tp); + } else tp = sc->sc_tty; tp->t_oproc = comstart; diff --git a/sys/dev/isa/com.c b/sys/dev/isa/com.c index b77194cdb2da..d9b909af1127 100644 --- a/sys/dev/isa/com.c +++ b/sys/dev/isa/com.c @@ -1,4 +1,4 @@ -/* $NetBSD: com.c,v 1.82 1996/05/12 23:52:00 mycroft Exp $ */ +/* $NetBSD: com.c,v 1.83 1996/05/30 18:24:09 cgd Exp $ */ /*- * Copyright (c) 1993, 1994, 1995, 1996 @@ -528,9 +528,10 @@ comopen(dev, flag, mode, p) if (!sc) return ENXIO; - if (!sc->sc_tty) + if (!sc->sc_tty) { tp = sc->sc_tty = ttymalloc(); - else + tty_attach(tp); + } else tp = sc->sc_tty; tp->t_oproc = comstart; diff --git a/sys/dev/isa/cy.c b/sys/dev/isa/cy.c index c99765308e73..235596d41a7b 100644 --- a/sys/dev/isa/cy.c +++ b/sys/dev/isa/cy.c @@ -1,4 +1,4 @@ -/* $NetBSD: cy.c,v 1.12 1995/06/28 04:31:32 cgd Exp $ */ +/* $NetBSD: cy.c,v 1.13 1996/05/30 18:24:16 cgd Exp $ */ /* XXX THIS DRIVER IS BROKEN. IT WILL NOT EVEN COMPILE. */ @@ -337,8 +337,10 @@ cyopen(dev_t dev, int flag, int mode, struct proc *p) infop = info[unit]; base = infop->base_addr; - if (!cy_tty[unit]) + if (!cy_tty[unit]) { infop->tty = cy_tty[unit] = ttymalloc(); + tty_attach(infop->tty); + } tp = infop->tty; tp->t_oproc = cystart;