kernel - Remove D_KQFILTER flag
[dragonfly.git] / sys / dev / serial / dgb / dgm.c
index 6e8ba89..88912c2 100644 (file)
@@ -242,14 +242,14 @@ static devclass_t dgmdevclass;
 
 #define        CDEV_MAJOR      101
 static struct dev_ops dgm_ops = {
-       { "dgm", CDEV_MAJOR, D_TTY | D_KQFILTER },
+       { "dgm", CDEV_MAJOR, D_TTY },
        .d_open =       dgmopen,
        .d_close =      dgmclose,
        .d_read =       ttyread,
        .d_write =      ttywrite,
        .d_ioctl =      dgmioctl,
-       .d_poll =       ttypoll,
-       .d_kqfilter =   ttykqfilter
+       .d_kqfilter =   ttykqfilter,
+       .d_revoke =     ttyrevoke
 };
 
 static int
@@ -783,7 +783,6 @@ dgmattach(device_t dev)
        else
                shrinkmem = 0;
 
-       dev_ops_add(&dgm_ops, DGM_UNITMASK, DGM_UNIT(sc->unit));
        for (i = 0; i < sc->numports; i++, bc++) {
                DPRINT3(DB_INFO, "dgm%d: Set up port %d\n", sc->unit, i);
                port = &sc->ports[i];
@@ -902,7 +901,7 @@ dgmdetach(device_t dev)
         * and dereference any ad-hoc-created devices, but does not
         * dereference devices created via make_dev().
         */
-       dev_ops_remove(&dgm_ops, DGM_UNITMASK, DGM_UNIT(sc->unit));
+       dev_ops_remove_minor(&dgm_ops/*, DGM_UNITMASK*/, DGM_UNIT(sc->unit));
 
        callout_stop(&sc->toh);
 
@@ -913,7 +912,7 @@ dgmdetach(device_t dev)
        FREE(sc->ttys, M_TTYS);
 
        if (sc->vmem) {
-               pmap_unmapdev(sc->vmem, sc->msize);
+               pmap_unmapdev((vm_offset_t)sc->vmem, sc->msize);
                sc->vmem = NULL;
        }
 
@@ -1394,14 +1393,13 @@ dgmpoll(void *unit_c)
                                                if (!(tp->t_state & TS_BUSY)) {
                                                        hidewin(sc);
 #ifndef TS_ASLEEP      /* post 2.0.5 FreeBSD */
-                                                       ttwwakeup(tp);
+                                                       ttwwakeup(tp); /* Issues KNOTE() */
 #else
                                                        if (tp->t_outq.c_cc <= tp->t_lowat) {
                                                                if (tp->t_state & TS_ASLEEP) {
                                                                        tp->t_state &= ~TS_ASLEEP;
                                                                        wakeup(TSA_OLOWAT(tp));
                                                                }
-                                                               /* selwakeup(&tp->t_wsel); */
                                                        }
 #endif
                                                        setwin(sc, 0);
@@ -2022,14 +2020,13 @@ dgmstart(struct tty *tp)
 
        while (tp->t_outq.c_cc != 0) {
 #ifndef TS_ASLEEP      /* post 2.0.5 FreeBSD */
-               ttwwakeup(tp);
+               ttwwakeup(tp); /* Issues KNOTE() */
 #else
                if (tp->t_outq.c_cc <= tp->t_lowat) {
                        if (tp->t_state & TS_ASLEEP) {
                                tp->t_state &= ~TS_ASLEEP;
                                wakeup(TSA_OLOWAT(tp));
                        }
-                       /*selwakeup(&tp->t_wsel);*/
                }
 #endif
                crit_enter();