From be9bd88238ecbf423e5a3c1a3d9664ef635bafd2 Mon Sep 17 00:00:00 2001 From: Poul-Henning Kamp Date: Tue, 1 Jun 2004 11:57:15 +0000 Subject: [PATCH] There is no need to explicitly call the stop function. In all likelyhood ->l_close() did it and ttyclose certainly will. --- sys/dev/cy/cy.c | 1 - sys/dev/digi/digi.c | 1 - sys/dev/nmdm/nmdm.c | 1 - sys/dev/rc/rc.c | 1 - sys/dev/rp/rp.c | 1 - sys/dev/si/si.c | 2 -- sys/dev/sio/sio.c | 1 - sys/dev/sx/sx.c | 2 -- sys/kern/tty_pty.c | 1 - sys/pc98/cbus/sio.c | 1 - sys/pc98/pc98/sio.c | 1 - 11 files changed, 13 deletions(-) diff --git a/sys/dev/cy/cy.c b/sys/dev/cy/cy.c index 710633322de9..194b01c1620d 100644 --- a/sys/dev/cy/cy.c +++ b/sys/dev/cy/cy.c @@ -795,7 +795,6 @@ sioclose(dev, flag, mode, td) cd_etc(com, CD1400_ETC_STOPBREAK); (*linesw[tp->t_line].l_close)(tp, flag); disc_optim(tp, &tp->t_termios, com); - comstop(tp, FREAD | FWRITE); comhardclose(com); ttyclose(tp); siosettimeout(); diff --git a/sys/dev/digi/digi.c b/sys/dev/digi/digi.c index 27b6268ab9f6..d5e413901dd4 100644 --- a/sys/dev/digi/digi.c +++ b/sys/dev/digi/digi.c @@ -902,7 +902,6 @@ digiclose(dev_t dev, int flag, int mode, struct thread *td) s = spltty(); linesw[tp->t_line].l_close(tp, flag); digi_disc_optim(tp, &tp->t_termios, port); - digistop(tp, FREAD | FWRITE); digihardclose(port); ttyclose(tp); if (--sc->opencnt == 0) diff --git a/sys/dev/nmdm/nmdm.c b/sys/dev/nmdm/nmdm.c index 888cda419ecd..79a547687ef8 100644 --- a/sys/dev/nmdm/nmdm.c +++ b/sys/dev/nmdm/nmdm.c @@ -313,7 +313,6 @@ nmdmclose(dev_t dev, int flag, int mode, struct thread *td) err = (*linesw[tp->t_line].l_close)(tp, flag); ourpart->modemsignals &= ~TIOCM_DTR; nmdm_crossover(dev->si_drv1, ourpart, otherpart); - nmdmstop(tp, FREAD|FWRITE); (void) ttyclose(tp); return (err); } diff --git a/sys/dev/rc/rc.c b/sys/dev/rc/rc.c index 96ea9face241..2a58b71e235b 100644 --- a/sys/dev/rc/rc.c +++ b/sys/dev/rc/rc.c @@ -962,7 +962,6 @@ rcclose(dev_t dev, int flag, int mode, d_thread_t *td) s = spltty(); (*linesw[tp->t_line].l_close)(tp, flag); disc_optim(tp, &tp->t_termios, rc); - rc_stop(tp, FREAD | FWRITE); rc_hardclose(rc); ttyclose(tp); splx(s); diff --git a/sys/dev/rp/rp.c b/sys/dev/rp/rp.c index 3f9f49f33ac8..926c14d545fe 100644 --- a/sys/dev/rp/rp.c +++ b/sys/dev/rp/rp.c @@ -1132,7 +1132,6 @@ rpclose(dev, flag, mode, td) oldspl = spltty(); (*linesw[tp->t_line].l_close)(tp, flag); rp_disc_optim(tp, &tp->t_termios); - rpstop(tp, FREAD | FWRITE); rphardclose(rp); tp->t_state &= ~TS_BUSY; diff --git a/sys/dev/si/si.c b/sys/dev/si/si.c index 1b76ad07abcc..bb1c102675e6 100644 --- a/sys/dev/si/si.c +++ b/sys/dev/si/si.c @@ -806,8 +806,6 @@ siclose(dev_t dev, int flag, int mode, struct thread *td) pp->sp_state &= ~SS_LSTART; } - si_stop(tp, FREAD | FWRITE); - sihardclose(pp); ttyclose(tp); pp->sp_state &= ~SS_OPEN; diff --git a/sys/dev/sio/sio.c b/sys/dev/sio/sio.c index f4c63ef75154..7eb106eddbc6 100644 --- a/sys/dev/sio/sio.c +++ b/sys/dev/sio/sio.c @@ -1385,7 +1385,6 @@ sioclose(dev, flag, mode, td) s = spltty(); (*linesw[tp->t_line].l_close)(tp, flag); disc_optim(tp, &tp->t_termios, com); - comstop(tp, FREAD | FWRITE); comhardclose(com); ttyclose(tp); siosettimeout(); diff --git a/sys/dev/sx/sx.c b/sys/dev/sx/sx.c index 8cef3aed5d33..0f07f9418140 100644 --- a/sys/dev/sx/sx.c +++ b/sys/dev/sx/sx.c @@ -547,8 +547,6 @@ sxclose( } /* ok. we are now still on the right track.. nuke the hardware */ - sx_stop(tp, FREAD | FWRITE); - sxhardclose(pp); ttyclose(tp); pp->sp_state &= ~SX_SS_OPEN; diff --git a/sys/kern/tty_pty.c b/sys/kern/tty_pty.c index 314bf161ea7c..2e51b3b2ca6e 100644 --- a/sys/kern/tty_pty.c +++ b/sys/kern/tty_pty.c @@ -208,7 +208,6 @@ ptsclose(dev, flag, mode, td) tp = dev->si_tty; err = (*linesw[tp->t_line].l_close)(tp, flag); - ptsstop(tp, FREAD|FWRITE); (void) ttyclose(tp); return (err); } diff --git a/sys/pc98/cbus/sio.c b/sys/pc98/cbus/sio.c index 51b811bfc3de..68045ab942db 100644 --- a/sys/pc98/cbus/sio.c +++ b/sys/pc98/cbus/sio.c @@ -2105,7 +2105,6 @@ sioclose(dev, flag, mode, td) com->modem_checking = 0; #endif disc_optim(tp, &tp->t_termios, com); - comstop(tp, FREAD | FWRITE); comhardclose(com); ttyclose(tp); siosettimeout(); diff --git a/sys/pc98/pc98/sio.c b/sys/pc98/pc98/sio.c index 51b811bfc3de..68045ab942db 100644 --- a/sys/pc98/pc98/sio.c +++ b/sys/pc98/pc98/sio.c @@ -2105,7 +2105,6 @@ sioclose(dev, flag, mode, td) com->modem_checking = 0; #endif disc_optim(tp, &tp->t_termios, com); - comstop(tp, FREAD | FWRITE); comhardclose(com); ttyclose(tp); siosettimeout();