ttyclose() increments t_gen. Remove redundant increments from drivers.
authorHasso Tepper <hasso@dragonflybsd.org>
Tue, 7 Aug 2007 11:30:03 +0000 (11:30 +0000)
committerHasso Tepper <hasso@dragonflybsd.org>
Tue, 7 Aug 2007 11:30:03 +0000 (11:30 +0000)
Obtained-from: FreeBSD

sys/dev/misc/dcons/dcons_os.c
sys/dev/serial/sio/sio_pccard.c
sys/dev/usbmisc/ucom/ucom.c

index 9ebba48..c318946 100644 (file)
@@ -32,7 +32,7 @@
  * SUCH DAMAGE.
  * 
  * $FreeBSD: src/sys/dev/dcons/dcons_os.c,v 1.4 2004/10/24 12:41:04 simokawa Exp $
- * $DragonFly: src/sys/dev/misc/dcons/dcons_os.c,v 1.11 2007/05/07 05:21:40 dillon Exp $
+ * $DragonFly: src/sys/dev/misc/dcons/dcons_os.c,v 1.12 2007/08/07 11:30:03 hasso Exp $
  */
 
 #include <sys/param.h>
@@ -596,7 +596,6 @@ dcons_detach(int port)
                kprintf("dcons: still opened\n");
 #if __FreeBSD_version < 502113
                (*linesw[tp->t_line].l_close)(tp, 0);
-               tp->t_gen++;
                ttyclose(tp);
                ttwakeup(tp);
                ttwwakeup(tp);
index 5db1dad..798c106 100644 (file)
@@ -30,7 +30,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $DragonFly: src/sys/dev/serial/sio/sio_pccard.c,v 1.7 2007/07/05 12:08:54 sephe Exp $
+ * $DragonFly: src/sys/dev/serial/sio/sio_pccard.c,v 1.8 2007/08/07 11:30:03 hasso Exp $
  */
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -136,7 +136,6 @@ sio_pccard_detach(device_t dev)
                bus_release_resource(dev, SYS_RES_IOPORT, 0, com->ioportres);
        if (com->tp && (com->tp->t_state & TS_ISOPEN)) {
                device_printf(dev, "still open, forcing close\n");
-               com->tp->t_gen++;
                ttyclose(com->tp);
                ttwakeup(com->tp);
                ttwwakeup(com->tp);
index 7e5a595..f581876 100644 (file)
@@ -2,7 +2,7 @@
  * $NetBSD: ucom.c,v 1.39 2001/08/16 22:31:24 augustss Exp $
  * $NetBSD: ucom.c,v 1.40 2001/11/13 06:24:54 lukem Exp $
  * $FreeBSD: src/sys/dev/usb/ucom.c,v 1.35 2003/11/16 11:58:21 akiyama Exp $
- * $DragonFly: src/sys/dev/usbmisc/ucom/ucom.c,v 1.29 2007/08/07 10:42:40 hasso Exp $
+ * $DragonFly: src/sys/dev/usbmisc/ucom/ucom.c,v 1.30 2007/08/07 11:30:03 hasso Exp $
  */
 /*-
  * Copyright (c) 2001-2002, Shunsuke Akiyama <akiyama@jp.FreeBSD.org>.
@@ -206,7 +206,6 @@ ucom_detach(struct ucom_softc *sc)
                        device_printf(sc->sc_dev,
                                      "still open, forcing close\n");
                        (*linesw[tp->t_line].l_close)(tp, 0);
-                       tp->t_gen++;
                        ttyclose(tp);
                        ttwakeup(tp);
                        ttwwakeup(tp);