From a1cda79464588cd8489700574b2e8608c1914f95 Mon Sep 17 00:00:00 2001 From: Poul-Henning Kamp Date: Tue, 1 Jun 2004 11:38:06 +0000 Subject: [PATCH] There is no need to explicitly call ttwakeup() and ttwwakeup() after ttyclose() has been called. It's already been done once by ttyclose, and probably once by the line-discipline too. --- sys/dev/dcons/dcons.c | 2 -- sys/dev/sio/sio.c | 2 -- sys/dev/usb/ubser.c | 4 ---- sys/dev/usb/ucom.c | 2 -- sys/pc98/cbus/sio.c | 2 -- sys/pc98/pc98/sio.c | 2 -- 6 files changed, 14 deletions(-) diff --git a/sys/dev/dcons/dcons.c b/sys/dev/dcons/dcons.c index ecdbadb1cb68..cb983e4669fc 100644 --- a/sys/dev/dcons/dcons.c +++ b/sys/dev/dcons/dcons.c @@ -587,8 +587,6 @@ dcons_detach(int port) printf("dcons: still opened\n"); (*linesw[tp->t_line].l_close)(tp, 0); ttyclose(tp); - ttwakeup(tp); - ttwwakeup(tp); } /* XXX * must wait until all device are closed. diff --git a/sys/dev/sio/sio.c b/sys/dev/sio/sio.c index dcbaedf8fc1b..f4c63ef75154 100644 --- a/sys/dev/sio/sio.c +++ b/sys/dev/sio/sio.c @@ -456,8 +456,6 @@ siodetach(dev) device_printf(dev, "still open, forcing close\n"); (*linesw[com->tp->t_line].l_close)(com->tp, 0); ttyclose(com->tp); - ttwakeup(com->tp); - ttwwakeup(com->tp); } else { if (com->ibuf != NULL) free(com->ibuf, M_DEVBUF); diff --git a/sys/dev/usb/ubser.c b/sys/dev/usb/ubser.c index 4432f7a9648a..b3edce89fca4 100644 --- a/sys/dev/usb/ubser.c +++ b/sys/dev/usb/ubser.c @@ -442,8 +442,6 @@ bad: if (tp->t_state & TS_ISOPEN) { (*linesw[tp->t_line].l_close)(tp, 0); ttyclose(tp); - ttwakeup(tp); - ttwwakeup(tp); } } destroy_dev(sc->dev[i]); @@ -478,8 +476,6 @@ USB_DETACH(ubser) if (tp->t_state & TS_ISOPEN) { (*linesw[tp->t_line].l_close)(tp, 0); ttyclose(tp); - ttwakeup(tp); - ttwwakeup(tp); } } destroy_dev(sc->dev[i]); diff --git a/sys/dev/usb/ucom.c b/sys/dev/usb/ucom.c index f713a32f153e..0a33937fa39f 100644 --- a/sys/dev/usb/ucom.c +++ b/sys/dev/usb/ucom.c @@ -215,8 +215,6 @@ ucom_detach(struct ucom_softc *sc) "still open, forcing close\n"); (*linesw[tp->t_line].l_close)(tp, 0); ttyclose(tp); - ttwakeup(tp); - ttwwakeup(tp); } } else { DPRINTF(("ucom_detach: no tty\n")); diff --git a/sys/pc98/cbus/sio.c b/sys/pc98/cbus/sio.c index cf72607a1821..51b811bfc3de 100644 --- a/sys/pc98/cbus/sio.c +++ b/sys/pc98/cbus/sio.c @@ -784,8 +784,6 @@ siodetach(dev) device_printf(dev, "still open, forcing close\n"); (*linesw[com->tp->t_line].l_close)(com->tp, 0); ttyclose(com->tp); - ttwakeup(com->tp); - ttwwakeup(com->tp); } else { if (com->ibuf != NULL) free(com->ibuf, M_DEVBUF); diff --git a/sys/pc98/pc98/sio.c b/sys/pc98/pc98/sio.c index cf72607a1821..51b811bfc3de 100644 --- a/sys/pc98/pc98/sio.c +++ b/sys/pc98/pc98/sio.c @@ -784,8 +784,6 @@ siodetach(dev) device_printf(dev, "still open, forcing close\n"); (*linesw[com->tp->t_line].l_close)(com->tp, 0); ttyclose(com->tp); - ttwakeup(com->tp); - ttwwakeup(com->tp); } else { if (com->ibuf != NULL) free(com->ibuf, M_DEVBUF);