summaryrefslogtreecommitdiff
path: root/sys/dev/qbus
diff options
context:
space:
mode:
authoreeh <eeh@NetBSD.org>2000-11-02 00:01:44 +0000
committereeh <eeh@NetBSD.org>2000-11-02 00:01:44 +0000
commit507aaec04ced6cd804a4e81ca4b999f0aeb7b4dc (patch)
tree3565ca2b32fd4ed4b11e9061e5e3420d914cd384 /sys/dev/qbus
parent52e63ea477c5d9a58c380c159dcd8ceebe81f079 (diff)
Adapt to the new line discipline scheme.
Diffstat (limited to 'sys/dev/qbus')
-rw-r--r--sys/dev/qbus/dhu.c22
-rw-r--r--sys/dev/qbus/dl.c18
-rw-r--r--sys/dev/qbus/dz.c24
-rw-r--r--sys/dev/qbus/qd.c18
4 files changed, 41 insertions, 41 deletions
diff --git a/sys/dev/qbus/dhu.c b/sys/dev/qbus/dhu.c
index 4878b4ca00a..32a772196ad 100644
--- a/sys/dev/qbus/dhu.c
+++ b/sys/dev/qbus/dhu.c
@@ -1,4 +1,4 @@
-/* $NetBSD: dhu.c,v 1.20 2000/06/05 00:09:18 matt Exp $ */
+/* $NetBSD: dhu.c,v 1.21 2000/11/02 00:01:45 eeh Exp $ */
/*
* Copyright (c) 1996 Ken C. Wellsch. All rights reserved.
* Copyright (c) 1992, 1993
@@ -287,10 +287,10 @@ dhurint(arg)
/* Do MDMBUF flow control, wakeup sleeping opens */
if (c & DHU_STAT_DCD) {
if (!(tp->t_state & TS_CARR_ON))
- (void)(*linesw[tp->t_line].l_modem)(tp, 1);
+ (void)(*tp->t_linesw->l_modem)(tp, 1);
}
else if ((tp->t_state & TS_CARR_ON) &&
- (*linesw[tp->t_line].l_modem)(tp, 0) == 0)
+ (*tp->t_linesw->l_modem)(tp, 0) == 0)
(void) dhumctl(sc, line, 0, DMSET);
/* Do CRTSCTS flow control */
@@ -326,7 +326,7 @@ dhurint(arg)
if (c & DHU_RBUF_PARITY_ERR)
cc |= TTY_PE;
- (*linesw[tp->t_line].l_rint)(cc, tp);
+ (*tp->t_linesw->l_rint)(cc, tp);
}
}
@@ -357,8 +357,8 @@ dhuxint(arg)
sc->sc_dhu[line].dhu_state = STATE_IDLE;
- if (tp->t_line)
- (*linesw[tp->t_line].l_start)(tp);
+ if (tp->t_linesw)
+ (*tp->t_linesw->l_start)(tp);
else
dhustart(tp);
}
@@ -425,7 +425,7 @@ dhuopen(dev, flag, mode, p)
(void) splx(s);
if (error)
return (error);
- return ((*linesw[tp->t_line].l_open)(dev, tp));
+ return ((*tp->t_linesw->l_open)(dev, tp));
}
/*ARGSUSED*/
@@ -446,7 +446,7 @@ dhuclose(dev, flag, mode, p)
tp = sc->sc_dhu[line].dhu_tty;
- (*linesw[tp->t_line].l_close)(tp, flag);
+ (*tp->t_linesw->l_close)(tp, flag);
/* Make sure a BREAK state is not left enabled. */
@@ -472,7 +472,7 @@ dhuread(dev, uio, flag)
sc = dhu_cd.cd_devs[DHU_M2U(minor(dev))];
tp = sc->sc_dhu[DHU_LINE(minor(dev))].dhu_tty;
- return ((*linesw[tp->t_line].l_read)(tp, uio, flag));
+ return ((*tp->t_linesw->l_read)(tp, uio, flag));
}
int
@@ -486,7 +486,7 @@ dhuwrite(dev, uio, flag)
sc = dhu_cd.cd_devs[DHU_M2U(minor(dev))];
tp = sc->sc_dhu[DHU_LINE(minor(dev))].dhu_tty;
- return ((*linesw[tp->t_line].l_write)(tp, uio, flag));
+ return ((*tp->t_linesw->l_write)(tp, uio, flag));
}
/*ARGSUSED*/
@@ -508,7 +508,7 @@ dhuioctl(dev, cmd, data, flag, p)
sc = dhu_cd.cd_devs[unit];
tp = sc->sc_dhu[line].dhu_tty;
- error = (*linesw[tp->t_line].l_ioctl)(tp, cmd, data, flag, p);
+ error = (*tp->t_linesw->l_ioctl)(tp, cmd, data, flag, p);
if (error >= 0)
return (error);
error = ttioctl(tp, cmd, data, flag, p);
diff --git a/sys/dev/qbus/dl.c b/sys/dev/qbus/dl.c
index 985cf15e65e..b308290e420 100644
--- a/sys/dev/qbus/dl.c
+++ b/sys/dev/qbus/dl.c
@@ -1,4 +1,4 @@
-/* $NetBSD: dl.c,v 1.14 2000/06/05 00:09:18 matt Exp $ */
+/* $NetBSD: dl.c,v 1.15 2000/11/02 00:01:45 eeh Exp $ */
/*-
* Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
@@ -261,7 +261,7 @@ dlrint(void *arg)
if (c & DL_RBUF_PARITY_ERR)
cc |= TTY_PE;
- (*linesw[tp->t_line].l_rint)(cc, tp);
+ (*tp->t_linesw->l_rint)(cc, tp);
#if defined(DIAGNOSTIC)
} else {
log(LOG_WARNING, "%s: stray rx interrupt\n",
@@ -279,8 +279,8 @@ dlxint(void *arg)
struct tty *tp = sc->sc_tty;
tp->t_state &= ~(TS_BUSY | TS_FLUSH);
- if (tp->t_line)
- (*linesw[tp->t_line].l_start)(tp);
+ if (tp->t_linesw)
+ (*tp->t_linesw->l_start)(tp);
else
dlstart(tp);
@@ -322,7 +322,7 @@ dlopen(dev_t dev, int flag, int mode, struct proc *p)
} else if ((tp->t_state & TS_XCLUDE) && p->p_ucred->cr_uid != 0)
return EBUSY;
- return ((*linesw[tp->t_line].l_open)(dev, tp));
+ return ((*tp->t_linesw->l_open)(dev, tp));
}
/*ARGSUSED*/
@@ -332,7 +332,7 @@ dlclose(dev_t dev, int flag, int mode, struct proc *p)
struct dl_softc *sc = dl_cd.cd_devs[minor(dev)];
struct tty *tp = sc->sc_tty;
- (*linesw[tp->t_line].l_close)(tp, flag);
+ (*tp->t_linesw->l_close)(tp, flag);
/* Make sure a BREAK state is not left enabled. */
dlbrk(sc, 0);
@@ -346,7 +346,7 @@ dlread(dev_t dev, struct uio *uio, int flag)
struct dl_softc *sc = dl_cd.cd_devs[minor(dev)];
struct tty *tp = sc->sc_tty;
- return ((*linesw[tp->t_line].l_read)(tp, uio, flag));
+ return ((*tp->t_linesw->l_read)(tp, uio, flag));
}
int
@@ -355,7 +355,7 @@ dlwrite(dev_t dev, struct uio *uio, int flag)
struct dl_softc *sc = dl_cd.cd_devs[minor(dev)];
struct tty *tp = sc->sc_tty;
- return ((*linesw[tp->t_line].l_write)(tp, uio, flag));
+ return ((*tp->t_linesw->l_write)(tp, uio, flag));
}
int
@@ -366,7 +366,7 @@ dlioctl(dev_t dev, unsigned long cmd, caddr_t data, int flag, struct proc *p)
int error;
- error = (*linesw[tp->t_line].l_ioctl)(tp, cmd, data, flag, p);
+ error = (*tp->t_linesw->l_ioctl)(tp, cmd, data, flag, p);
if (error >= 0)
return (error);
error = ttioctl(tp, cmd, data, flag, p);
diff --git a/sys/dev/qbus/dz.c b/sys/dev/qbus/dz.c
index 6de32f31700..c41817381d9 100644
--- a/sys/dev/qbus/dz.c
+++ b/sys/dev/qbus/dz.c
@@ -1,4 +1,4 @@
-/* $NetBSD: dz.c,v 1.24 2000/06/05 00:09:18 matt Exp $ */
+/* $NetBSD: dz.c,v 1.25 2000/11/02 00:01:45 eeh Exp $ */
/*
* Copyright (c) 1996 Ken C. Wellsch. All rights reserved.
* Copyright (c) 1992, 1993
@@ -206,10 +206,10 @@ dzrint(void *arg)
continue;
if (j == 2) /* Second char wasn't 'D' */
- (*linesw[tp->t_line].l_rint)(27, tp);
+ (*tp->t_linesw->l_rint)(27, tp);
}
#endif
- (*linesw[tp->t_line].l_rint)(cc, tp);
+ (*tp->t_linesw->l_rint)(cc, tp);
}
}
@@ -270,8 +270,8 @@ dzxint(void *arg)
else
ndflush (&tp->t_outq, cl->c_cc);
- if (tp->t_line)
- (*linesw[tp->t_line].l_start)(tp);
+ if (tp->t_linesw)
+ (*tp->t_linesw->l_start)(tp);
else
dzstart(tp);
}
@@ -330,7 +330,7 @@ dzopen(dev_t dev, int flag, int mode, struct proc *p)
(void) splx(s);
if (error)
return (error);
- return ((*linesw[tp->t_line].l_open)(dev, tp));
+ return ((*tp->t_linesw->l_open)(dev, tp));
}
/*ARGSUSED*/
@@ -348,7 +348,7 @@ dzclose(dev_t dev, int flag, int mode, struct proc *p)
tp = sc->sc_dz[line].dz_tty;
- (*linesw[tp->t_line].l_close)(tp, flag);
+ (*tp->t_linesw->l_close)(tp, flag);
/* Make sure a BREAK state is not left enabled. */
(void) dzmctl(sc, line, DML_BRK, DMBIC);
@@ -369,7 +369,7 @@ dzread(dev_t dev, struct uio *uio, int flag)
sc = dz_cd.cd_devs[DZ_I2C(minor(dev))];
tp = sc->sc_dz[DZ_PORT(minor(dev))].dz_tty;
- return ((*linesw[tp->t_line].l_read)(tp, uio, flag));
+ return ((*tp->t_linesw->l_read)(tp, uio, flag));
}
int
@@ -381,7 +381,7 @@ dzwrite(dev_t dev, struct uio *uio, int flag)
sc = dz_cd.cd_devs[DZ_I2C(minor(dev))];
tp = sc->sc_dz[DZ_PORT(minor(dev))].dz_tty;
- return ((*linesw[tp->t_line].l_write)(tp, uio, flag));
+ return ((*tp->t_linesw->l_write)(tp, uio, flag));
}
/*ARGSUSED*/
@@ -398,7 +398,7 @@ dzioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p)
sc = dz_cd.cd_devs[unit];
tp = sc->sc_dz[line].dz_tty;
- error = (*linesw[tp->t_line].l_ioctl)(tp, cmd, data, flag, p);
+ error = (*tp->t_linesw->l_ioctl)(tp, cmd, data, flag, p);
if (error >= 0)
return (error);
error = ttioctl(tp, cmd, data, flag, p);
@@ -661,9 +661,9 @@ dzscan(void *arg)
if ((DZ_READ_BYTE(dr_dcd) | sc->sc_dsr) & bit) {
if (!(tp->t_state & TS_CARR_ON))
- (*linesw[tp->t_line].l_modem) (tp, 1);
+ (*tp->t_linesw->l_modem) (tp, 1);
} else if ((tp->t_state & TS_CARR_ON) &&
- (*linesw[tp->t_line].l_modem)(tp, 0) == 0) {
+ (*tp->t_linesw->l_modem)(tp, 0) == 0) {
DZ_WRITE_BYTE(dr_tcr,
(DZ_READ_WORD(dr_tcrw) & 255) & ~bit);
}
diff --git a/sys/dev/qbus/qd.c b/sys/dev/qbus/qd.c
index 3ae602dacb1..30fba280e20 100644
--- a/sys/dev/qbus/qd.c
+++ b/sys/dev/qbus/qd.c
@@ -1,4 +1,4 @@
-/* $NetBSD: qd.c,v 1.20 2000/06/28 17:09:43 mrg Exp $ */
+/* $NetBSD: qd.c,v 1.21 2000/11/02 00:01:45 eeh Exp $ */
/*-
* Copyright (c) 1988 Regents of the University of California.
@@ -869,7 +869,7 @@ qdopen(dev, flag, mode, p)
* enable intrpts, open line discipline
*/
dga->csr |= GLOBAL_IE; /* turn on the interrupts */
- return ((*linesw[tp->t_line].l_open)(dev, tp));
+ return ((*tp->t_linesw->l_open)(dev, tp));
}
dga->csr |= GLOBAL_IE; /* turn on the interrupts */
return(0);
@@ -1058,7 +1058,7 @@ qdclose(dev, flag, mode, p)
* this is the console
*/
tp = qd_tty[minor_dev];
- (*linesw[tp->t_line].l_close)(tp, flag);
+ (*tp->t_linesw->l_close)(tp, flag);
ttyclose(tp);
tp->t_state = 0;
qdflags[unit].inuse &= ~CONS_DEV;
@@ -1492,7 +1492,7 @@ qdioctl(dev, cmd, datap, flags, p)
tp = qd_tty[minor_dev];
error =
- (*linesw[tp->t_line].l_ioctl)(tp, cmd, datap, flags, p);
+ (*tp->t_linesw->l_ioctl)(tp, cmd, datap, flags, p);
if (error >= 0) {
return(error);
}
@@ -1609,7 +1609,7 @@ qdwrite(dev, uio, flag)
* this is the console...
*/
tp = qd_tty[minor_dev];
- return ((*linesw[tp->t_line].l_write)(tp, uio, flag));
+ return ((*tp->t_linesw->l_write)(tp, uio, flag));
} else if (qdflags[unit].inuse & GRAPHIC_DEV) {
/*
* this is a DMA xfer from user space
@@ -1638,7 +1638,7 @@ qdread(dev, uio, flag)
* this is the console
*/
tp = qd_tty[minor_dev];
- return ((*linesw[tp->t_line].l_read)(tp, uio, flag));
+ return ((*tp->t_linesw->l_read)(tp, uio, flag));
} else if (qdflags[unit].inuse & GRAPHIC_DEV) {
/*
* this is a bitmap-to-processor xfer
@@ -2841,7 +2841,7 @@ GET_TBUTTON:
char *string;
string = q_special[chr & 0x7F];
while(*string)
- (*linesw[tp->t_line].l_rint)(*string++, tp);
+ (*tp->t_linesw->l_rint)(*string++, tp);
}
else {
#ifdef DDB
@@ -2854,9 +2854,9 @@ GET_TBUTTON:
return;
if (j == 2) /* Second char wasn't 'D' */
- (*linesw[tp->t_line].l_rint)(27, tp);
+ (*tp->t_linesw->l_rint)(27, tp);
#endif
- (*linesw[tp->t_line].l_rint)(chr&0177, tp);
+ (*tp->t_linesw->l_rint)(chr&0177, tp);
}
}
}