From 2140d01b277fa2ab698e66dda69e434f0be7bd13 Mon Sep 17 00:00:00 2001 From: Poul-Henning Kamp Date: Fri, 4 Jun 2004 16:02:56 +0000 Subject: Machine generated patch which changes linedisc calls from accessing linesw[] directly to using the ttyld...() functions The ttyld...() functions ar inline so there is no performance hit. --- sys/dev/digi/digi.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'sys/dev/digi') diff --git a/sys/dev/digi/digi.c b/sys/dev/digi/digi.c index 06d8d18a4fc2..122fc2f7bd8b 100644 --- a/sys/dev/digi/digi.c +++ b/sys/dev/digi/digi.c @@ -832,7 +832,7 @@ open_top: /* handle fake and initial DCD for callout devices */ if (bc->mstat & port->cd || mynor & CALLOUT_MASK) - linesw[tp->t_line].l_modem(tp, 1); + ttyld_modem(tp, 1); } /* Wait for DCD if necessary */ @@ -849,7 +849,7 @@ open_top: } goto open_top; } - error = linesw[tp->t_line].l_open(dev, tp); + error = ttyld_open(tp, dev); DLOG(DIGIDB_OPEN, (sc->dev, "port %d: l_open error = %d\n", pnum, error)); @@ -900,7 +900,7 @@ digiclose(dev_t dev, int flag, int mode, struct thread *td) DLOG(DIGIDB_CLOSE, (sc->dev, "port %d: closing\n", pnum)); s = spltty(); - linesw[tp->t_line].l_close(tp, flag); + ttyld_close(tp, flag); digi_disc_optim(tp, &tp->t_termios, port); digihardclose(port); ttyclose(tp); @@ -970,7 +970,7 @@ digiread(dev_t dev, struct uio *uio, int flag) KASSERT(sc, ("digi%d: softc not allocated in digiclose\n", unit)); tp = &sc->ttys[pnum]; - error = linesw[tp->t_line].l_read(tp, uio, flag); + error = ttyld_read(tp, uio, flag); DLOG(DIGIDB_READ, (sc->dev, "port %d: read() returns %d\n", pnum, error)); @@ -996,7 +996,7 @@ digiwrite(dev_t dev, struct uio *uio, int flag) KASSERT(sc, ("digi%d: softc not allocated in digiclose\n", unit)); tp = &sc->ttys[pnum]; - error = linesw[tp->t_line].l_write(tp, uio, flag); + error = ttyld_write(tp, uio, flag); DLOG(DIGIDB_WRITE, (sc->dev, "port %d: write() returns %d\n", pnum, error)); @@ -1651,26 +1651,26 @@ end_of_data: DLOG(DIGIDB_RI, (sc->dev, "port %d: RING\n", event.pnum)); if (port->send_ring) { - linesw[tp->t_line].l_rint('R', tp); - linesw[tp->t_line].l_rint('I', tp); - linesw[tp->t_line].l_rint('N', tp); - linesw[tp->t_line].l_rint('G', tp); - linesw[tp->t_line].l_rint('\r', tp); - linesw[tp->t_line].l_rint('\n', tp); + ttyld_rint(tp, 'R'); + ttyld_rint(tp, 'I'); + ttyld_rint(tp, 'N'); + ttyld_rint(tp, 'G'); + ttyld_rint(tp, '\r'); + ttyld_rint(tp, '\n'); } } } if (event.event & BREAK_IND) { DLOG(DIGIDB_MODEM, (sc->dev, "port %d: BREAK_IND\n", event.pnum)); - linesw[tp->t_line].l_rint(TTY_BI, tp); + ttyld_rint(tp, TTY_BI); } if (event.event & (LOWTX_IND | EMPTYTX_IND)) { DLOG(DIGIDB_IRQ, (sc->dev, "port %d:%s%s\n", event.pnum, event.event & LOWTX_IND ? " LOWTX" : "", event.event & EMPTYTX_IND ? " EMPTYTX" : "")); - (*linesw[tp->t_line].l_start)(tp); + ttyld_start(tp); } } sc->gdata->eout = etail; -- cgit v1.3