DEVFS - remove dev_ops_add(), dev_ops_get(), and get_dev()
authorMatthew Dillon <dillon@apollo.backplane.com>
Sat, 1 Aug 2009 18:26:48 +0000 (11:26 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Sat, 1 Aug 2009 18:26:48 +0000 (11:26 -0700)
106 files changed:
sys/bus/cam/cam_xpt.c
sys/bus/cam/scsi/scsi_ch.c
sys/bus/cam/scsi/scsi_pass.c
sys/bus/cam/scsi/scsi_pt.c
sys/bus/cam/scsi/scsi_sa.c
sys/bus/cam/scsi/scsi_ses.c
sys/bus/firewire/firewirereg.h
sys/bus/iicbus/iic.c
sys/bus/isa/vga_isa.c
sys/bus/pci/pci.c
sys/bus/smbus/smb.c
sys/bus/usb/usb.c
sys/contrib/ipfilter/netinet/mlfk_ipl.c
sys/dev/acpica5/acpi.c
sys/dev/agp/agp.c
sys/dev/disk/ata/ata-all.c
sys/dev/disk/ata/atapi-tape.c
sys/dev/disk/fd/fd.c
sys/dev/disk/isp/isp_freebsd.c
sys/dev/disk/nata/ata-all.c
sys/dev/disk/nata/atapi-cd.c
sys/dev/disk/nata/atapi-tape.c
sys/dev/disk/wt/wt.c
sys/dev/drm/drm_drv.c
sys/dev/misc/cmx/cmx.c
sys/dev/misc/dcons/dcons_os.c
sys/dev/misc/gpib/gpib.c
sys/dev/misc/joy/joy.c
sys/dev/misc/kbd/kbd.c
sys/dev/misc/labpc/labpc.c
sys/dev/misc/lpt/lpt.c
sys/dev/misc/mse/mse.c
sys/dev/misc/nmdm/nmdm.c
sys/dev/misc/pcfclock/pcfclock.c
sys/dev/misc/ppi/ppi.c
sys/dev/misc/pps/pps.c
sys/dev/misc/psm/psm.c
sys/dev/misc/spic/spic.c
sys/dev/misc/spigot/spigot.c
sys/dev/misc/syscons/syscons.c
sys/dev/misc/syscons/sysmouse.c
sys/dev/misc/tw/tw.c
sys/dev/raid/aac/aac.c
sys/dev/raid/amr/amr.c
sys/dev/raid/asr/asr.c
sys/dev/raid/ciss/ciss.c
sys/dev/raid/iir/iir_ctrl.c
sys/dev/raid/ips/ips.c
sys/dev/raid/mlx/mlx.c
sys/dev/raid/mly/mly.c
sys/dev/raid/twa/twa_freebsd.c
sys/dev/raid/twe/twe_freebsd.c
sys/dev/raid/vinum/vinum.c
sys/dev/serial/cy/cy.c
sys/dev/serial/dgb/dgm.c
sys/dev/serial/rc/rc.c
sys/dev/serial/rp/rp.c
sys/dev/serial/si/si.c
sys/dev/serial/sio/sio.c
sys/dev/serial/stl/stallion.c
sys/dev/serial/stli/istallion.c
sys/dev/sound/pcm/mixer.c
sys/dev/sound/pcm/sndstat.c
sys/dev/sound/pcm/sound.c
sys/dev/usbmisc/ucom/ucom.c
sys/dev/usbmisc/ufm/ufm.c
sys/dev/usbmisc/ugen/ugen.c
sys/dev/usbmisc/uhid/uhid.c
sys/dev/usbmisc/ulpt/ulpt.c
sys/dev/usbmisc/ums/ums.c
sys/dev/usbmisc/urio/urio.c
sys/dev/usbmisc/uscanner/uscanner.c
sys/dev/video/bktr/bktr_os.c
sys/dev/video/ctx/ctx.c
sys/dev/video/cxm/cxm.c
sys/dev/video/gsc/gsc.c
sys/dev/video/meteor/meteor.c
sys/kern/kern_conf.c
sys/kern/kern_descrip.c
sys/kern/kern_device.c
sys/kern/kern_memio.c
sys/kern/subr_bus.c
sys/kern/subr_log.c
sys/kern/tty_cons.c
sys/kern/tty_pty.c
sys/kern/tty_tty.c
sys/net/bpf.c
sys/net/i4b/driver/i4b_ctl.c
sys/net/i4b/driver/i4b_rbch.c
sys/net/i4b/driver/i4b_tel.c
sys/net/i4b/driver/i4b_trace.c
sys/net/i4b/layer4/i4b_i4bdrv.c
sys/net/pf/pf_ioctl.c
sys/netproto/smb/smb_dev.c
sys/opencrypto/cryptodev.c
sys/platform/pc32/acpica5/acpi_machdep.c
sys/platform/pc32/apm/apm.c
sys/platform/pc32/i386/elan-mmcr.c
sys/platform/pc32/i386/perfmon.c
sys/platform/pc32/isa/asc.c
sys/platform/pc64/acpica5/acpi_machdep.c
sys/platform/pc64/apm/apm.c
sys/platform/pc64/isa/asc.c
sys/platform/vkernel/platform/console.c
sys/sys/device.h
sys/vfs/mfs/mfs_vfsops.c

index be9dcef..1995cc2 100644 (file)
@@ -953,7 +953,6 @@ dev_allocq_is_runnable(struct cam_devq *devq)
 static void
 xpt_periph_init(void)
 {
-       dev_ops_add(&xpt_ops, 0, 0);
        make_dev(&xpt_ops, 0, UID_ROOT, GID_OPERATOR, 0600, "xpt0");
 }
 
index b91ece7..a32745e 100644 (file)
@@ -362,7 +362,6 @@ chregister(struct cam_periph *periph, void *arg)
                          DEVSTAT_PRIORITY_OTHER);
 
        /* Register the device */
-       dev_ops_add(&ch_ops, -1, periph->unit_number);
        make_dev(&ch_ops, periph->unit_number, UID_ROOT,
                  GID_OPERATOR, 0600, "%s%d", periph->periph_name,
                  periph->unit_number);
index 107882b..23b9771 100644 (file)
@@ -283,7 +283,6 @@ passregister(struct cam_periph *periph, void *arg)
                          DEVSTAT_PRIORITY_PASS);
 
        /* Register the device */
-       dev_ops_add(&pass_ops, -1, periph->unit_number);
        make_dev(&pass_ops, periph->unit_number, UID_ROOT,
                  GID_OPERATOR, 0600, "%s%d", periph->periph_name,
                  periph->unit_number);
index 4f080f6..4e98e25 100644 (file)
@@ -314,7 +314,6 @@ ptctor(struct cam_periph *periph, void *arg)
                          SID_TYPE(&cgd->inq_data) | DEVSTAT_TYPE_IF_SCSI,
                          DEVSTAT_PRIORITY_OTHER);
 
-       dev_ops_add(&pt_ops, -1, periph->unit_number);
        make_dev(&pt_ops, periph->unit_number, UID_ROOT,
                  GID_OPERATOR, 0600, "%s%d", periph->periph_name,
                  periph->unit_number);
index 3e0f8dc..9fd3168 100644 (file)
@@ -1519,7 +1519,6 @@ saregister(struct cam_periph *periph, void *arg)
            DEVSTAT_BS_UNAVAILABLE, SID_TYPE(&cgd->inq_data) |
            DEVSTAT_TYPE_IF_SCSI, DEVSTAT_PRIORITY_TAPE);
 
-       dev_ops_add(&sa_ops, SA_UNITMASK, SA_UNIT(periph->unit_number));
        make_dev(&sa_ops, SAMINOR(SA_CTLDEV,
            periph->unit_number, 0, SA_ATYPE_R), UID_ROOT, GID_OPERATOR,
            0660, "%s%d.ctl", periph->periph_name, periph->unit_number);
index 05ce8a3..2a0bdf8 100644 (file)
@@ -349,7 +349,6 @@ sesregister(struct cam_periph *periph, void *arg)
        cam_extend_set(sesperiphs, periph->unit_number, periph);
 
        cam_periph_unlock(periph);
-       dev_ops_add(&ses_ops, -1, periph->unit_number);
        make_dev(&ses_ops, periph->unit_number,
                    UID_ROOT, GID_OPERATOR, 0600, "%s%d",
                    periph->periph_name, periph->unit_number);
index 1dececc..9453065 100644 (file)
@@ -300,7 +300,6 @@ struct fw_device *fw_noderesolve_nodeid (struct firewire_comm *, int);
 struct fw_device *fw_noderesolve_eui64 (struct firewire_comm *, struct fw_eui64 *);
 struct fw_bind *fw_bindlookup (struct firewire_comm *, u_int16_t, u_int32_t);
 void fw_drain_txq (struct firewire_comm *);
-int fwdev_makedev (struct firewire_softc *);
 int fwdev_destroydev (struct firewire_softc *);
 void fwdev_clone (void *, char *, int, cdev_t *);
 
index 47ef3d8..ab69d6f 100644 (file)
@@ -123,7 +123,6 @@ iic_probe(device_t dev)
 static int
 iic_attach(device_t dev)
 {
-       dev_ops_add(&iic_ops, -1, device_get_unit(dev));
        make_dev(&iic_ops, device_get_unit(dev),        /* XXX cleanup */
                        UID_ROOT, GID_WHEEL,
                        0600, "iic%d", device_get_unit(dev));
index 66e9675..3a1c1f0 100644 (file)
@@ -153,7 +153,6 @@ isavga_attach(device_t dev)
 
 #ifdef FB_INSTALL_CDEV
        /* attach a virtual frame buffer device */
-       dev_ops_add(&isavga_ops, VGA_MKMINOR(-1), VGA_MKMINOR(unit));
        sc->devt = make_dev(&isavga_ops, VGA_MKMINOR(unit), 0, 0, 02660, "vga%x", VGA_MKMINOR(unit));
        reference_dev(sc->devt);
        error = fb_attach(sc->devt, sc->adp);
index 7a4257f..c462a35 100644 (file)
@@ -4026,9 +4026,8 @@ pci_modevent(module_t mod, int what, void *arg)
        case MOD_LOAD:
                STAILQ_INIT(&pci_devq);
                pci_generation = 0;
-               dev_ops_add(&pcic_ops, -1, 0);
                pci_cdev = make_dev(&pcic_ops, 0, UID_ROOT, GID_WHEEL, 0644,
-                   "pci%d", 0);
+                                   "pci%d", 0);
                pci_load_vendor_data();
                break;
 
index 681c385..fb25491 100644 (file)
@@ -124,10 +124,9 @@ smb_probe(device_t dev)
 static int
 smb_attach(device_t dev)
 {
-       dev_ops_add(&smb_ops, -1, device_get_unit(dev));
-       make_dev(&smb_ops, device_get_unit(dev),        /* XXX cleanup */
-                       UID_ROOT, GID_WHEEL,
-                       0600, "smb%d", device_get_unit(dev));
+       make_dev(&smb_ops, device_get_unit(dev),
+                UID_ROOT, GID_WHEEL,
+                0600, "smb%d", device_get_unit(dev));
        return (0);
 }
 
index 7aafa77..d2b736d 100644 (file)
@@ -314,16 +314,17 @@ usb_attach(device_t self)
                sc->sc_bus->use_polling--;
 
        usb_create_event_thread(self);
-       /* The per controller devices (used for usb_discover) */
-       /* XXX This is redundant now, but old usbd's will want it */
-       dev_ops_add(&usb_ops, -1, device_get_unit(self));
+
+       /*
+        * The per controller devices (used for usb_discover)
+        * XXX This is redundant now, but old usbd's will want it
+        */
        tmp_dev = make_dev(&usb_ops, device_get_unit(self),
                           UID_ROOT, GID_OPERATOR, 0660,
                           "usb%d", device_get_unit(self));
        sc->sc_usbdev = reference_dev(tmp_dev);
        if (usb_ndevs++ == 0) {
                /* The device spitting out events */
-               dev_ops_add(&usb_ops, -1, USB_DEV_MINOR);
                tmp_dev = make_dev(&usb_ops, USB_DEV_MINOR,
                                   UID_ROOT, GID_OPERATOR, 0660, "usb");
                usb_dev = reference_dev(tmp_dev);
@@ -882,7 +883,6 @@ usb_detach(device_t self)
        }
 
        release_dev(sc->sc_usbdev);
-       dev_ops_add(&usb_ops, -1, device_get_unit(self));
 
        if (--usb_ndevs == 0) {
                int i;
index 289493e..f47d847 100644 (file)
@@ -123,7 +123,6 @@ ipfilter_modevent(module_t mod, int type, void *unused)
                error = iplattach();
                if (error)
                        break;
-               dev_ops_add(&ipl_ops, 0, 0);
 
                c = NULL;
                for(i=strlen(IPL_NAME); i>0; i--)
index 7910265..cb1aa9d 100644 (file)
@@ -667,7 +667,6 @@ acpi_attach(device_t dev)
     sc->acpi_sleep_disabled = 0;
 
     /* Create the control device */
-    dev_ops_add(&acpi_ops, 0, 0);
     sc->acpi_dev_t = make_dev(&acpi_ops, 0, UID_ROOT, GID_WHEEL, 0644,
                              "acpi");
     sc->acpi_dev_t->si_drv1 = sc;
index e246dc6..7da4e4f 100644 (file)
@@ -241,9 +241,8 @@ agp_generic_attach(device_t dev)
        TAILQ_INIT(&sc->as_memory);
        sc->as_nextid = 1;
 
-       dev_ops_add(&agp_ops, -1, device_get_unit(dev));
        make_dev(&agp_ops, device_get_unit(dev), UID_ROOT, GID_WHEEL,
-                 0600, "agpgart");
+                0600, "agpgart");
 
        return 0;
 }
index fd741dc..925e1dc 100644 (file)
@@ -1595,8 +1595,7 @@ bpack(int8_t *src, int8_t *dst, int len)
 static void
 ata_init(void)
 {
-    /* register controlling device */
-    dev_ops_add(&ata_ops, 0, 0);
     make_dev(&ata_ops, 0, UID_ROOT, GID_OPERATOR, 0600, "ata");
 }
+
 SYSINIT(atadev, SI_SUB_DRIVERS, SI_ORDER_SECOND, ata_init, NULL)
index 0e290fa..4023a67 100644 (file)
@@ -124,7 +124,6 @@ astattach(struct ata_device *atadev)
                      DEVSTAT_NO_ORDERED_TAGS,
                      DEVSTAT_TYPE_SEQUENTIAL | DEVSTAT_TYPE_IF_IDE,
                      DEVSTAT_PRIORITY_TAPE);
-    dev_ops_add(&ast_ops, dkunitmask(), dkmakeunit(stp->lun));
     dev = make_dev(&ast_ops, dkmakeminor(stp->lun, 0, 0),
                   UID_ROOT, GID_OPERATOR, 0640, "ast%d", stp->lun);
     dev->si_drv1 = stp;
index d6af48b..a22fa8a 100644 (file)
@@ -1022,9 +1022,6 @@ fd_attach(device_t dev)
         * whole-slice-part.  If we did we would have to provide our
         * own DIOCGPART ioctl.
         */
-       dev_ops_add(&fd_ops,
-                   dkunitmask() | dkmakeslice(-1) | dkmakepart(128|64),
-                   dkmakeminor(fd->fdu, WHOLE_DISK_SLICE, 128));
        make_dev(&fd_ops, dkmakeminor(fd->fdu, WHOLE_DISK_SLICE, 128 + 1),
                 UID_ROOT, GID_WHEEL, 0600, "fd%d.1720", fd->fdu);
        make_dev(&fd_ops, dkmakeminor(fd->fdu, WHOLE_DISK_SLICE, 128 + 2),
index b2eb054..fd3f7db 100644 (file)
@@ -192,9 +192,8 @@ isp_attach(struct ispsoftc *isp)
        /*
         * Create device nodes
         */
-       dev_ops_add(&isp_ops, -1, device_get_unit(isp->isp_dev));
        make_dev(&isp_ops, device_get_unit(isp->isp_dev), UID_ROOT,
-           GID_OPERATOR, 0600, "%s", device_get_nameunit(isp->isp_dev));
+                GID_OPERATOR, 0600, "%s", device_get_nameunit(isp->isp_dev));
 
        if (isp->isp_role != ISP_ROLE_NONE) {
                isp->isp_state = ISP_RUNSTATE;
index 72629e3..4f7b151 100644 (file)
@@ -1003,7 +1003,6 @@ ata_module_event_handler(module_t mod, int what, void *arg)
     switch (what) {
     case MOD_LOAD:
        /* register controlling device */
-       dev_ops_add(&ata_ops, 0, 0);
        atacdev = make_dev(&ata_ops, 0, UID_ROOT, GID_OPERATOR, 0600, "ata");
        reference_dev(atacdev);
        return 0;
index 6becb23..23d662e 100644 (file)
@@ -144,7 +144,6 @@ acd_attach(device_t dev)
 
     cdev = disk_create(device_get_unit(dev), &cdp->disk, &acd_ops);
 #if 0
-    dev_ops_add(&acd_ops, dkunitmask(), dkmakeunit(device_get_unit(dev)));
     cdev = make_dev(&acd_ops, dkmakeminor(device_get_unit(dev), 0, 0),
                      UID_ROOT, GID_OPERATOR, 0644, "acd%d",
                      device_get_unit(dev));
index f625a21..c1842e0 100644 (file)
@@ -135,7 +135,6 @@ ast_attach(device_t dev)
                      DEVSTAT_NO_ORDERED_TAGS,
                      DEVSTAT_TYPE_SEQUENTIAL | DEVSTAT_TYPE_IF_IDE,
                      DEVSTAT_PRIORITY_TAPE);
-    dev_ops_add(&ast_ops, dkunitmask(), dkmakeunit(device_get_unit(dev)));
     cdev = make_dev(&ast_ops, 2 * device_get_unit(dev), UID_ROOT, GID_OPERATOR,
                    0640, "ast%d", device_get_unit(dev));
     reference_dev(cdev);
index e9ed822..b989599 100644 (file)
@@ -260,7 +260,6 @@ wtattach (struct isa_device *id)
        t->dens = -1;                           /* unknown density */
        isa_dmainit(t->chan, 1024);
 
-       dev_ops_add(&wt_ops, -1, id->id_unit);
        make_dev(&wt_ops, id->id_unit, 0, 0, 0600, "rwt%d", id->id_unit);
        return (1);
 }
index f4c2cf0..fa2166b 100644 (file)
@@ -194,13 +194,8 @@ int drm_attach(device_t kdev, drm_pci_id_list_t *idlist)
        else
                dev->device = kdev;
 
-       dev_ops_add(&drm_cdevsw, -1, unit);
-       dev->devnode = make_dev(&drm_cdevsw,
-                       unit,
-                       DRM_DEV_UID,
-                       DRM_DEV_GID,
-                       DRM_DEV_MODE,
-                       "dri/card%d", unit);
+       dev->devnode = make_dev(&drm_cdevsw, unit, DRM_DEV_UID, DRM_DEV_GID,
+                               DRM_DEV_MODE, "dri/card%d", unit);
 
        dev->pci_domain = 0;
        dev->pci_bus = pci_get_bus(dev->device);
index 1969db1..7aa26d5 100644 (file)
@@ -246,7 +246,6 @@ cmx_attach(device_t dev)
        if (!sc || sc->dying)
                return ENXIO;
 
-       dev_ops_add(&cmx_ops, -1, device_get_unit(dev));
        sc->cdev = make_dev(&cmx_ops, 0, UID_ROOT, GID_WHEEL, 0600,
                            "cmx%d", device_get_unit(dev));
        if (!sc->cdev) {
index 4232d3d..f684a71 100644 (file)
@@ -567,9 +567,6 @@ dcons_attach(void)
 {
        int polltime;
 
-#ifdef __DragonFly__
-       dev_ops_add(&dcons_ops, -1, 0);
-#endif
        dcons_attach_port(DCONS_CON, "dcons", 0);
        dcons_attach_port(DCONS_GDB, "dgdb", DC_GDB);
 #if __FreeBSD_version < 500000
index ba8e77c..b3149f7 100644 (file)
@@ -126,7 +126,6 @@ gpattach(struct isa_device *isdp)
            kprintf ("gp%d: type AT-GPIB chip NAT4882A\n",sc->sc_unit);
         sc->sc_flags |=ATTACHED;
 
-       dev_ops_add(&gp_ops, -1, sc->sc_unit);
        make_dev(&gp_ops, sc->sc_unit, 0, 0, 0600, "gp");
         return (1);
 }
index ab0949d..4ab4e42 100644 (file)
@@ -132,7 +132,6 @@ joy_attach (device_t dev)
     joy->bt = rman_get_bustag(res);
     joy->port = rman_get_bushandle(res);
     joy->timeout[0] = joy->timeout[1] = 0;
-    dev_ops_add(&joy_ops, -1, unit);
     make_dev(&joy_ops, unit, 0, 0, 0600, "joy%d", unit);
     return 0;
 }
index dd1f183..a64bfce 100644 (file)
@@ -466,7 +466,6 @@ kbd_attach(keyboard_t *kbd)
        if (keyboard[kbd->kb_index] != kbd)
                return EINVAL;
 
-       dev_ops_add(&kbd_ops, -1, kbd->kb_index);
        dev = make_dev(&kbd_ops, kbd->kb_index, UID_ROOT, GID_WHEEL, 0600,
                       "kbd%r", kbd->kb_index);
        if (dev->si_drv1 == NULL)
index 070e49e..b27247f 100644 (file)
@@ -475,9 +475,8 @@ labpcattach(struct isa_device *dev)
        ctlr->dcr_is = 0x80;
        loutb(DCR(ctlr), ctlr->dcr_val);
 
-       dev_ops_add(&labpc_ops, -1, dev->id_unit);
        make_dev(&labpc_ops, dev->id_unit, 0, 0, 0600, 
-               "labpc%d", dev->id_unit);
+                "labpc%d", dev->id_unit);
        return 1;
 }
 
index f079543..0ef454e 100644 (file)
@@ -399,11 +399,10 @@ lpt_attach(device_t dev)
 
        lpt_release_ppbus(dev);
 
-       dev_ops_add(&lpt_ops, LP_UNITMASK, unit);
-       make_dev(&lpt_ops, unit,
-           UID_ROOT, GID_WHEEL, 0600, LPT_NAME "%d", unit);
-       make_dev(&lpt_ops, unit | LP_BYPASS,
-           UID_ROOT, GID_WHEEL, 0600, LPT_NAME "%d.ctl", unit);
+       make_dev(&lpt_ops, unit, UID_ROOT, GID_WHEEL,
+                0600, LPT_NAME "%d", unit);
+       make_dev(&lpt_ops, unit | LP_BYPASS, UID_ROOT, GID_WHEEL,
+                0600, LPT_NAME "%d.ctl", unit);
        return (0);
 }
 
index 6fcab81..a5b3556 100644 (file)
@@ -347,7 +347,6 @@ mse_attach(device_t dev)
        sc->mode.accelfactor = (flags & MSE_CONFIG_ACCEL) >> 4;
        callout_init(&sc->sc_callout);
 
-       dev_ops_add(&mse_ops, ~1, unit << 1);
        make_dev(&mse_ops, unit << 1, 0, 0, 0600, "mse%d", unit);
        make_dev(&mse_ops, (unit<<1)+1, 0, 0, 0600, "nmse%d", unit);
 
index fd151da..40757a3 100644 (file)
@@ -131,11 +131,10 @@ nmdminit(int n)
                return;
 
        pt = kmalloc(sizeof(*pt), M_NLMDM, M_WAITOK | M_ZERO);
-       dev_ops_add(&nmdm_ops, ~1, n << 1);
        pt->part1.dev = dev1 = make_dev(&nmdm_ops, n << 1,
-           0, 0, 0666, "nmdm%dA", n);
+                                       0, 0, 0666, "nmdm%dA", n);
        pt->part2.dev = dev2 = make_dev(&nmdm_ops, (n << 1) + 1,
-           0, 0, 0666, "nmdm%dB", n);
+                                       0, 0, 0666, "nmdm%dB", n);
 
        dev1->si_drv1 = dev2->si_drv1 = pt;
        dev1->si_tty = &pt->part1.nm_tty;
index 6549a5f..190658a 100644 (file)
@@ -132,9 +132,8 @@ pcfclock_attach(device_t dev)
        
        unit = device_get_unit(dev);
 
-       dev_ops_add(&pcfclock_ops, -1, unit);
        make_dev(&pcfclock_ops, unit,
-                       UID_ROOT, GID_WHEEL, 0444, PCFCLOCK_NAME "%d", unit);
+                UID_ROOT, GID_WHEEL, 0444, PCFCLOCK_NAME "%d", unit);
 
        return (0);
 }
index 192e415..c607f2c 100644 (file)
@@ -163,7 +163,6 @@ ppi_attach(device_t dev)
                                                &zero, irq, irq, 1, RF_ACTIVE);
 #endif /* PERIPH_1284 */
 
-       dev_ops_add(&ppi_ops, -1, device_get_unit(dev));
        make_dev(&ppi_ops, device_get_unit(dev),        /* XXX cleanup */
                 UID_ROOT, GID_WHEEL,
                 0600, "ppi%d", device_get_unit(dev));
index 86484dc..190e60d 100644 (file)
@@ -104,9 +104,8 @@ ppsattach(device_t ppsdev)
                return (ENXIO);
 
        unit = device_get_unit(ppsdev);
-       dev_ops_add(&pps_ops, -1, unit);
-       make_dev(&pps_ops, unit, UID_ROOT, GID_WHEEL, 0644,
-                   PPS_NAME "%d", unit);
+       make_dev(&pps_ops, unit, UID_ROOT, GID_WHEEL,
+                0644, PPS_NAME "%d", unit);
        return (0);
 }
 
index 66e5867..ed7e956 100644 (file)
@@ -1240,7 +1240,6 @@ psmattach(device_t dev)
     }
 
     /* Done */
-    dev_ops_add(&psm_ops, PSM_MKMINOR(-1, 0), PSM_MKMINOR(unit, 0));
     make_dev(&psm_ops, PSM_MKMINOR(unit, FALSE), 0, 0, 0666, "psm%d", unit);
     make_dev(&psm_ops, PSM_MKMINOR(unit, TRUE), 0, 0, 0666, "bpsm%d", unit);
 
index fe656a5..83eedb5 100644 (file)
@@ -347,7 +347,6 @@ spic_attach(device_t dev)
        spic_call1(sc, 0x92);
 
        /* There can be only one */
-       dev_ops_add(&spic_ops, -1, device_get_unit(dev));
        make_dev(&spic_ops, device_get_unit(dev), 0, 0, 0600, "jogdial");
 
        return 0;
index 8054827..6fd953a 100644 (file)
@@ -140,7 +140,6 @@ spigot_attach(struct isa_device *devp)
        devp->id_intr = (inthand2_t *)spigintr;
        ss->maddr = kvtop(devp->id_maddr);
        ss->irq = devp->id_irq;
-       dev_ops_add(&spigot_ops, -1, unit);
        make_dev(&spigot_ops, unit, 0, 0, 0644, "spigot%d", unit);
        return 1;
 }
index e199766..3d056d2 100644 (file)
@@ -390,23 +390,18 @@ sc_attach_unit(int unit, int flags)
                              (void *)(uintptr_t)unit, SHUTDOWN_PRI_DEFAULT);
 
     /* 
-     * create devices.  dev_ops_add() must be called to make devices under
-     * this major number available to userland.
+     * create devices.
+     *
+     * The first vty already has struct tty and scr_stat initialized
+     * in scinit().  The other vtys will have these structs when
+     * first opened.
      */
-    dev_ops_add(&sc_ops, ~(MAXCONS - 1), unit * MAXCONS);
-
-    for (vc = 1; vc < sc->vtys; vc++) { //XXX: possibly breaks something, or even a lot
+    for (vc = 1; vc < sc->vtys; vc++) {
        dev = make_dev(&sc_ops, vc + unit * MAXCONS,
-           UID_ROOT, GID_WHEEL, 0600, "ttyv%r", vc + unit * MAXCONS);
+                       UID_ROOT, GID_WHEEL,
+                       0600, "ttyv%r", vc + unit * MAXCONS);
        sc->dev[vc] = dev;
-       /*
-        * The first vty already has struct tty and scr_stat initialized
-        * in scinit().  The other vtys will have these structs when
-        * first opened.
-        */
     }
-
-    dev_ops_add(&sc_ops, -1, SC_CONSOLECTL);   /* XXX */
     cctl_dev = make_dev(&sc_ops, SC_CONSOLECTL,
                        UID_ROOT, GID_WHEEL, 0600, "consolectl");
     cctl_dev->si_tty = sc_console_tty = ttymalloc(sc_console_tty);
index 64e2f12..ba3ea51 100644 (file)
@@ -252,9 +252,8 @@ sm_attach_mouse(void *unused)
 {
        cdev_t dev;
 
-       dev_ops_add(&sm_ops, -1, SC_MOUSE);
-       dev = make_dev(&sm_ops, SC_MOUSE, UID_ROOT, GID_WHEEL, 0600,
-                      "sysmouse");
+       dev = make_dev(&sm_ops, SC_MOUSE, UID_ROOT, GID_WHEEL,
+                      0600, "sysmouse");
        /* sysmouse doesn't have scr_stat */
 }
 
index 516ea5f..587280c 100644 (file)
@@ -397,7 +397,6 @@ twattach(struct isa_device *idp)
   sc->sc_state = 0;
   sc->sc_rcount = 0;
   callout_init(&sc->abortrcv_ch);
-  dev_ops_add(&tw_ops, -1, unit);
   make_dev(&tw_ops, unit, 0, 0, 0600, "tw%d", unit);
   return (1);
 }
index 5c81149..a03e945 100644 (file)
@@ -351,9 +351,8 @@ aac_attach(struct aac_softc *sc)
         * Make the control device.
         */
        unit = device_get_unit(sc->aac_dev);
-       dev_ops_add(&aac_ops, -1, unit);
-       sc->aac_dev_t = make_dev(&aac_ops, unit, UID_ROOT, GID_OPERATOR, 0640,
-                                "aac%d", unit);
+       sc->aac_dev_t = make_dev(&aac_ops, unit, UID_ROOT, GID_OPERATOR,
+                                0640, "aac%d", unit);
        sc->aac_dev_t->si_drv1 = sc;
        reference_dev(sc->aac_dev_t);
 
index 7d33a65..5abffca 100644 (file)
@@ -236,7 +236,6 @@ amr_attach(struct amr_softc *sc)
     /*
      * Create the control device.
      */
-    dev_ops_add(&amr_ops, -1, device_get_unit(sc->amr_dev));
     sc->amr_dev_t = make_dev(&amr_ops, device_get_unit(sc->amr_dev), 
                            UID_ROOT, GID_OPERATOR, S_IRUSR | S_IWUSR,
                            "amr%d", device_get_unit(sc->amr_dev));
index f17dc92..25ba50b 100644 (file)
@@ -473,28 +473,6 @@ STATIC struct dev_ops asr_ops = {
         .d_ioctl =     asr_ioctl,
 };
 
-/*
- * Initialize the dynamic dev_ops hooks.
- */
-STATIC void
-asr_drvinit (void * unused)
-{
-        static int asr_devsw_installed = 0;
-
-        if (asr_devsw_installed) {
-                return;
-        }
-        asr_devsw_installed++;
-
-        /*
-        * Adding the ops will dynamically assign a major number.
-         */
-        dev_ops_add(&asr_ops, 0, 0);
-} /* asr_drvinit */
-
-/* XXX Must initialize before CAM layer picks up our HBA driver */
-SYSINIT(asrdev,SI_SUB_DRIVERS,SI_ORDER_MIDDLE,asr_drvinit,NULL)
-
 /* I2O support routines */
 #define defAlignLong(STRUCT,NAME) char NAME[sizeof(STRUCT)]
 #define getAlignLong(STRUCT,NAME) ((STRUCT *)(NAME))
index 70bcadc..5250dd6 100644 (file)
@@ -456,10 +456,9 @@ ciss_attach(device_t dev)
      */
     ciss_periodic(sc);
 
-   /*
+    /*
      * Create the control device.
      */
-    dev_ops_add(&ciss_ops, -1, device_get_unit(sc->ciss_dev));
     sc->ciss_dev_t = make_dev(&ciss_ops, device_get_unit(sc->ciss_dev),
                              UID_ROOT, GID_OPERATOR, S_IRUSR | S_IWUSR,
                              "ciss%d", device_get_unit(sc->ciss_dev));
index 269ab81..2d06e71 100644 (file)
@@ -81,7 +81,6 @@ static struct dev_ops iir_ops = {
         .d_ioctl =     iir_ioctl,
 };
 
-static int iir_devsw_installed = 0;
 #ifndef SDEV_PER_HBA
 static int sdev_made = 0;
 #endif
@@ -366,16 +365,3 @@ iir_ioctl(struct dev_ioctl_args *ap)
     return (0);
 }
 
-static void
-iir_drvinit(void *unused)
-{
-    GDT_DPRINTF(GDT_D_DEBUG, ("iir_drvinit()\n"));
-                
-    if (!iir_devsw_installed) {
-        /* Add the I/O (data) channel */
-        dev_ops_add(&iir_ops, 0, 0);
-        iir_devsw_installed = 1;
-    }
-}
-
-SYSINIT(iir_dev, SI_SUB_DRIVERS, SI_ORDER_MIDDLE + CDEV_MAJOR, iir_drvinit, NULL)
index 00afa1f..31657f3 100644 (file)
@@ -450,10 +450,9 @@ ips_adapter_init(ips_softc_t *sc)
                    "failed to initialize command buffers\n");
                goto error;
        }
-       dev_ops_add(&ips_ops, -1, device_get_unit(sc->dev));
        dev = make_dev(&ips_ops, device_get_unit(sc->dev),
-                                  UID_ROOT, GID_OPERATOR, S_IRUSR | S_IWUSR,
-                                  "ips%d", device_get_unit(sc->dev));
+                      UID_ROOT, GID_OPERATOR, S_IRUSR | S_IWUSR,
+                      "ips%d", device_get_unit(sc->dev));
        dev->si_drv1 = sc;
        ips_diskdev_init(sc);
        callout_reset(&sc->timer, 10 * hz, ips_timeout, sc);
index b5d43b8..093f477 100644 (file)
@@ -468,10 +468,9 @@ mlx_attach(struct mlx_softc *sc)
     /*
      * Create the control device.
      */
-    dev_ops_add(&mlx_ops, -1, device_get_unit(sc->mlx_dev));
     make_dev(&mlx_ops, device_get_unit(sc->mlx_dev), 
-           UID_ROOT, GID_OPERATOR, S_IRUSR | S_IWUSR,
-           "mlx%d", device_get_unit(sc->mlx_dev));
+            UID_ROOT, GID_OPERATOR, S_IRUSR | S_IWUSR,
+            "mlx%d", device_get_unit(sc->mlx_dev));
 
     /*
      * Start the timeout routine.
index 2cb1c07..5883830 100644 (file)
@@ -310,10 +310,9 @@ mly_attach(device_t dev)
     /*
      * Create the control device.
      */
-    dev_ops_add(&mly_ops, -1, device_get_unit(sc->mly_dev));
     sc->mly_dev_t = make_dev(&mly_ops, device_get_unit(sc->mly_dev),
-                               UID_ROOT, GID_OPERATOR, S_IRUSR | S_IWUSR, 
-                               "mly%d", device_get_unit(sc->mly_dev));
+                            UID_ROOT, GID_OPERATOR, S_IRUSR | S_IWUSR,
+                            "mly%d", device_get_unit(sc->mly_dev));
     sc->mly_dev_t->si_drv1 = sc;
 
     /* enable interrupts now */
index 98bd59b..e705bf9 100644 (file)
@@ -290,7 +290,6 @@ twa_attach(device_t dev)
        twa_describe_controller(sc);
 
        /* Create the control device. */
-       dev_ops_add(&twa_ops, -1, device_get_unit(sc->twa_bus_dev));
        xdev = make_dev(&twa_ops, device_get_unit(sc->twa_bus_dev),
                        UID_ROOT, GID_OPERATOR, S_IRUSR | S_IWUSR,
                        "twa%d", device_get_unit(sc->twa_bus_dev));
index 1b9d528..ff05f42 100644 (file)
@@ -301,16 +301,17 @@ twe_attach(device_t dev)
     /*
      * Create the control device.
      */
-       dev_ops_add(&twe_ops, -1, device_get_unit(sc->twe_dev));
     sc->twe_dev_t = make_dev(&twe_ops, device_get_unit(sc->twe_dev),
-                       UID_ROOT, GID_OPERATOR, S_IRUSR | S_IWUSR, "twe%d",
-                       device_get_unit(sc->twe_dev));
+                            UID_ROOT, GID_OPERATOR,
+                            S_IRUSR | S_IWUSR, "twe%d",
+                            device_get_unit(sc->twe_dev));
     sc->twe_dev_t->si_drv1 = sc;
+
     /*
-     * Schedule ourselves to bring the controller up once interrupts are available.
-     * This isn't strictly necessary, since we disable interrupts while probing the
-     * controller, but it is more in keeping with common practice for other disk 
-     * devices.
+     * Schedule ourselves to bring the controller up once interrupts are
+     * available.  This isn't strictly necessary, since we disable
+     * interrupts while probing the controller, but it is more in keeping
+     * with common practice for other disk devices.
      */
     sc->twe_ich.ich_func = twe_intrhook;
     sc->twe_ich.ich_arg = sc;
index 5d83821..3c85619 100644 (file)
@@ -97,7 +97,9 @@ vinumattach(void *dummy)
     daemonq = NULL;                                        /* initialize daemon's work queue */
     dqend = NULL;
 
-    dev_ops_add(&vinum_ops, 0, 0);                         /* add the ops entry */
+#if 0
+    dev_ops_add(&vinum_ops, 0, 0);
+#endif
 
     vinum_conf.physbufs = nswbuf / 2 + 1;                  /* maximum amount of physical bufs */
 
index 403b7de..66a8774 100644 (file)
@@ -613,7 +613,6 @@ cyattach_common(cy_addr cy_iobase, int cy_align)
                sio_registered = TRUE;
        }
        minorbase = UNIT_TO_MINOR(unit);
-       dev_ops_add(&sio_ops, UNIT_TO_MINOR(-1), minorbase);
        make_dev(&sio_ops, minorbase,
                UID_ROOT, GID_WHEEL, 0600, "ttyc%r%r", adapter,
                unit % CY_MAX_PORTS);
index afd11c8..7386832 100644 (file)
@@ -784,7 +784,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];
index 6465c56..bcc2bdd 100644 (file)
@@ -260,7 +260,6 @@ rcattach(struct isa_device *dvp)
        }
        rcb->rcb_probed = RC_ATTACHED;
        if (!rc_started) {
-               dev_ops_add(&rc_ops, -1, rcb->rcb_unit);
                register_swi(SWI_TTY, rcpoll, NULL, "rcpoll", NULL);
                callout_init(&rc_wakeup_ch);
                rc_wakeup(NULL);
index 8569c06..d831ad7 100644 (file)
@@ -828,7 +828,6 @@ rp_attachcommon(CONTROLLER_T *ctlp, int num_aiops, int num_ports)
        rp_addr(unit) = rp;
        crit_exit();
 
-       dev_ops_add(&rp_ops, 0xffff0000, (unit + 1) << 16);
        for (i = 0 ; i < rp_num_ports[unit] ; i++) {
                make_dev(&rp_ops, ((unit + 1) << 16) | i,
                          UID_ROOT, GID_WHEEL, 0666, "ttyR%c",
index 564a56f..dfc8e5e 100644 (file)
@@ -600,8 +600,6 @@ try_next2:
                done_chartimes = 1;
        }
 
-       dev_ops_add(&si_ops, 0x7f, unit);
-/*     path    name    devsw           minor   type   uid gid perm*/
        for (x = 0; x < sc->sc_nport; x++) {
                /* sync with the manuals that start at 1 */
                y = x + 1 + unit * (1 << SI_CARDSHIFT);
index 8ad8b9f..dc95110 100644 (file)
@@ -1178,8 +1178,6 @@ determined_type: ;
                sio_registered = TRUE;
        }
        minorbase = UNIT_TO_MINOR(unit);
-       dev_ops_add(&sio_ops, UNIT_TO_MINOR(-1), minorbase);
-       //kprintf("sioattach: make_dev for ttyd%r\n", unit);
        make_dev(&sio_ops, minorbase,
            UID_ROOT, GID_WHEEL, 0600, "ttyd%r", unit);
        make_dev(&sio_ops, minorbase | CONTROL_INIT_STATE,
index 7c63792..3c19404 100644 (file)
@@ -868,7 +868,6 @@ static int stlattach(struct isa_device *idp)
 
        /* register devices for DEVFS */
        boardnr = brdp->brdnr;
-       dev_ops_add(&stl_ops, 31, boardnr);
        make_dev(&stl_ops, boardnr + 0x1000000, UID_ROOT, GID_WHEEL,
                 0600, "staliomem%d", boardnr);
 
index 660dd0f..8553f3e 100644 (file)
@@ -3415,7 +3415,6 @@ static int stli_brdattach(stlibrd_t *brdp)
        kprintf("stli%d: %s (driver version %s), unit=%d nrpanels=%d "
                "nrports=%d\n", brdp->unitid, stli_brdnames[brdp->brdtype],
                stli_drvversion, brdp->brdnr, brdp->nrpanels, brdp->nrports);
-       dev_ops_add(&stli_ops, -1, brdp->unitid);
        return(0);
 }
 
index 4ef4528..0663865 100644 (file)
@@ -364,9 +364,8 @@ mixer_init(device_t dev, kobj_class_t cls, void *devinfo)
        mixer_setrecsrc(m, SOUND_MASK_MIC);
 
        unit = device_get_unit(dev);
-       dev_ops_add(&mixer_cdevsw, -1, PCMMKMINOR(unit, SND_DEV_CTL, 0));
        pdev = make_dev(&mixer_cdevsw, PCMMKMINOR(unit, SND_DEV_CTL, 0),
-                UID_ROOT, GID_WHEEL, 0666, "mixer%d", unit);
+                       UID_ROOT, GID_WHEEL, 0666, "mixer%d", unit);
        reference_dev(pdev);
        pdev->si_drv1 = m;
        snddev = device_get_softc(dev);
index 5103c0c..e665e01 100644 (file)
@@ -343,10 +343,9 @@ sndstat_init(void)
 {
        lockinit(&sndstat_lock, "sndstat", 0, 0);
        if (make_dev(&sndstat_cdevsw, SND_DEV_STATUS,
-                    UID_ROOT, GID_WHEEL, 0444, "sndstat") == NULL)
+                    UID_ROOT, GID_WHEEL, 0444, "sndstat") == NULL) {
                return ENXIO;
-       dev_ops_add(&sndstat_cdevsw, -1, SND_DEV_STATUS);
-
+       }
        return 0;
 }
 
index a4909ad..dc92387 100644 (file)
@@ -671,44 +671,26 @@ retry_chan_num_search_out:
        /*
         * I will revisit these someday, and nuke it mercilessly..
         */
-       dev_ops_add(&dsp_cdevsw,
-                   PCMMKMINOR(-1, -1, 0),
-                   PCMMKMINOR(device, SND_DEV_DSP, sce->chan_num));
        sce->dsp_devt = make_dev(&dsp_cdevsw,
-                       PCMMKMINOR(device, SND_DEV_DSP, sce->chan_num),
-                       UID_ROOT, GID_WHEEL, 0666, "dsp%d.%d",
-                       device, sce->chan_num);
+                           PCMMKMINOR(device, SND_DEV_DSP, sce->chan_num),
+                           UID_ROOT, GID_WHEEL, 0666, "dsp%d.%d",
+                           device, sce->chan_num);
        reference_dev(sce->dsp_devt);
 
-       dev_ops_add(&dsp_cdevsw,
-                   PCMMKMINOR(-1, -1, 0),
-                   PCMMKMINOR(device, SND_DEV_DSP16, sce->chan_num));
        sce->dspW_devt = make_dev(&dsp_cdevsw,
-                       PCMMKMINOR(device, SND_DEV_DSP16, sce->chan_num),
-                       UID_ROOT, GID_WHEEL, 0666, "dspW%d.%d",
-                       device, sce->chan_num);
+                           PCMMKMINOR(device, SND_DEV_DSP16, sce->chan_num),
+                           UID_ROOT, GID_WHEEL, 0666, "dspW%d.%d",
+                           device, sce->chan_num);
        reference_dev(sce->dspW_devt);
 
-       /*
-       dev_ops_add(&dsp_cdevsw,
-                   PCMMKMINOR(-1, -1, 0),
-                   PCMMKMINOR(device, SND_DEV_DSP, sce->chan_num));
-       sce->audio_devt = make_dev(&dsp_cdevsw,
-                       PCMMKMINOR(device, SND_DEV_DSP, sce->chan_num),
-                       UID_ROOT, GID_WHEEL, 0666, "audio%d.%d",
-                       device, sce->chan_num);
-       */
        sce->audio_devt = sce->dsp_devt;
        reference_dev(sce->audio_devt);
 
        if (ch->direction == PCMDIR_REC) {
-               dev_ops_add(&dsp_cdevsw,
-                           PCMMKMINOR(-1, -1, 0),
-                           PCMMKMINOR(device, SND_DEV_DSPREC, sce->chan_num));
                sce->dspr_devt = make_dev(&dsp_cdevsw,
-                               PCMMKMINOR(device, SND_DEV_DSPREC,
+                                   PCMMKMINOR(device, SND_DEV_DSPREC,
                                        sce->chan_num), UID_ROOT, GID_WHEEL,
-                               0666, "dspr%d.%d", device, sce->chan_num);
+                                   0666, "dspr%d.%d", device, sce->chan_num);
                reference_dev(sce->dspr_devt);
        }
 
index 4d9f754..d18cd42 100644 (file)
@@ -177,7 +177,6 @@ ucom_attach(struct ucom_softc *sc)
 
        DPRINTF(("ucom_attach: make_dev: ucom%d\n", unit));
 
-       dev_ops_add(&ucom_ops, UCOMUNIT_MASK, unit);
        dev = make_dev(&ucom_ops, unit | UCOM_CALLOUT_MASK,
                        UID_UUCP, GID_DIALER, 0660,
                        "ucom%d", unit);
index 02d4460..3ecb7ec 100644 (file)
@@ -176,10 +176,9 @@ ufm_attach(device_t self)
        sc->sc_epaddr = edesc->bEndpointAddress;
 
        /* XXX no error trapping, no storing of cdev_t */
-       dev_ops_add(&ufm_ops, -1, device_get_unit(self));
        make_dev(&ufm_ops, device_get_unit(self),
-                       UID_ROOT, GID_OPERATOR,
-                       0644, "ufm%d", device_get_unit(self));
+                UID_ROOT, GID_OPERATOR,
+                0644, "ufm%d", device_get_unit(self));
 
        DPRINTFN(10, ("ufm_attach: %p\n", sc->sc_udev));
 
index ffc54a5..ebfc008 100644 (file)
@@ -244,10 +244,9 @@ ugen_attach(device_t self)
        }
 
        /* the main device, ctrl endpoint */
-       dev_ops_add(&ugen_ops, 
-                   UGENUNITMASK, UGENMINOR(device_get_unit(sc->sc_dev), 0));
        make_dev(&ugen_ops, UGENMINOR(device_get_unit(sc->sc_dev), 0),
-               UID_ROOT, GID_OPERATOR, 0644, "%s", device_get_nameunit(sc->sc_dev));
+                UID_ROOT, GID_OPERATOR, 0644,
+                "%s", device_get_nameunit(sc->sc_dev));
 
        usbd_add_drv_event(USB_EVENT_DRIVER_ATTACH, sc->sc_udev, sc->sc_dev);
        return 0;
index f2f6b83..c66b965 100644 (file)
@@ -257,10 +257,9 @@ uhid_attach(device_t self)
        sc->sc_repdesc = desc;
        sc->sc_repdesc_size = size;
 
-       dev_ops_add(&uhid_ops, -1, device_get_unit(self));
        make_dev(&uhid_ops, device_get_unit(self),
-               UID_ROOT, GID_OPERATOR,
-               0644, "uhid%d", device_get_unit(self));
+                UID_ROOT, GID_OPERATOR,
+                0644, "uhid%d", device_get_unit(self));
 
        return 0;
 }
index 2fd6916..d3754aa 100644 (file)
@@ -295,12 +295,13 @@ ulpt_attach(device_t self)
        sc->sc_ifaceno = id->bInterfaceNumber;
        sc->sc_udev = dev;
 
-       dev_ops_add(&ulpt_ops, -1, device_get_unit(self));
        make_dev(&ulpt_ops, device_get_unit(self),
-               UID_ROOT, GID_OPERATOR, 0644, "ulpt%d", device_get_unit(self));
+                UID_ROOT, GID_OPERATOR, 0644,
+                "ulpt%d", device_get_unit(self));
        make_dev(&ulpt_ops,
-               device_get_unit(self)|ULPT_NOPRIME,
-               UID_ROOT, GID_OPERATOR, 0644, "unlpt%d", device_get_unit(self));
+                device_get_unit(self)|ULPT_NOPRIME,
+                UID_ROOT, GID_OPERATOR, 0644,
+                "unlpt%d", device_get_unit(self));
 
        usbd_add_drv_event(USB_EVENT_DRIVER_ATTACH, sc->sc_udev,
                           sc->sc_dev);
index b68c854..01bd6f4 100644 (file)
@@ -340,10 +340,9 @@ ums_attach(device_t self)
        sc->status.button = sc->status.obutton = 0;
        sc->status.dx = sc->status.dy = sc->status.dz = 0;
 
-       dev_ops_add(&ums_ops, -1, device_get_unit(self));
        make_dev(&ums_ops, device_get_unit(self),
-               UID_ROOT, GID_OPERATOR,
-               0644, "ums%d", device_get_unit(self));
+                UID_ROOT, GID_OPERATOR,
+                0644, "ums%d", device_get_unit(self));
 
        if (usbd_get_quirks(uaa->device)->uq_flags & UQ_SPUR_BUT_UP) {
                DPRINTF(("%s: Spurious button up events\n",
index 2382ec9..b7a55ce 100644 (file)
@@ -221,10 +221,9 @@ urio_attach(device_t self)
                goto nobulk;
        }
 
-       dev_ops_add(&urio_ops, -1, device_get_unit(self));
        make_dev(&urio_ops, device_get_unit(self),
-                       UID_ROOT, GID_OPERATOR,
-                       0644, "urio%d", device_get_unit(self));
+                UID_ROOT, GID_OPERATOR,
+                0644, "urio%d", device_get_unit(self));
 
        DPRINTFN(10, ("urio_attach: %p\n", sc->sc_udev));
 
index 36d1a92..37fb997 100644 (file)
@@ -371,9 +371,9 @@ uscanner_attach(device_t self)
        sc->sc_bulkout = ed_bulkout->bEndpointAddress;
 
        /* the main device, ctrl endpoint */
-       dev_ops_add(&uscanner_ops, -1, device_get_unit(sc->sc_dev));
        make_dev(&uscanner_ops, device_get_unit(sc->sc_dev),
-               UID_ROOT, GID_OPERATOR, 0644, "%s", device_get_nameunit(sc->sc_dev));
+                UID_ROOT, GID_OPERATOR, 0644,
+                "%s", device_get_nameunit(sc->sc_dev));
 
        usbd_add_drv_event(USB_EVENT_DRIVER_ATTACH, sc->sc_udev,
                           sc->sc_dev);
index 368a289..5247f4e 100644 (file)
@@ -351,12 +351,10 @@ bktr_attach( device_t dev )
        common_bktr_attach( bktr, unit, fun, rev );
 
        /* make the device entries */
-       dev_ops_add(&bktr_ops, 0x0f, unit);
        make_dev(&bktr_ops, unit,    0, 0, 0444, "bktr%d",  unit);
        make_dev(&bktr_ops, unit+16, 0, 0, 0444, "tuner%d", unit);
        make_dev(&bktr_ops, unit+32, 0, 0, 0444, "vbi%d"  , unit);
 
-
        return 0;
 
 fail:
index 40f044a..6432060 100644 (file)
@@ -193,9 +193,8 @@ ctxattach(struct isa_device * devp)
        sr->iobase = devp->id_iobase;
        sr->maddr = devp->id_maddr;
        sr->msize = devp->id_msize;
-       dev_ops_add(&ctx_ops, -1, devp->id_unit);
        make_dev(&ctx_ops, devp->id_unit, 0, 0, 0600, 
-               "ctx%d", devp->id_unit);
+                "ctx%d", devp->id_unit);
        return (1);
 }
 
index bf872b4..c70009f 100644 (file)
@@ -1882,9 +1882,8 @@ cxm_attach(device_t dev)
 
 
        /* make the device entries */
-       dev_ops_add(&cxm_ops, -1, unit);
        sc->cxm_dev_t = make_dev(&cxm_ops, unit,
-                               0, 0, 0444, "cxm%d",  unit);
+                                0, 0, 0444, "cxm%d",  unit);
 
        return 0;
 
index 24b5990..d94e295 100644 (file)
@@ -518,16 +518,16 @@ gscattach(struct isa_device *isdp)
   scu->flags |= ATTACHED;
   lprintf(("gsc%d.attach: ok\n", unit));
   scu->flags &= ~FLAG_DEBUG;
+
 #define GSC_UID 0
 #define GSC_GID 13
-  dev_ops_add(&gsc_ops, 0xc0, unit << 6);
   make_dev(&gsc_ops, unit<<6, GSC_UID, GSC_GID, 0666, "gsc%d", unit);
   make_dev(&gsc_ops, ((unit<<6) + FRMT_PBM),
-     GSC_UID,  GSC_GID, 0666, "gsc%dp", unit);
+          GSC_UID,  GSC_GID, 0666, "gsc%dp", unit);
   make_dev(&gsc_ops, ((unit<<6) + DBUG_MASK),
-     GSC_UID,  GSC_GID, 0666, "gsc%dd", unit);
+          GSC_UID,  GSC_GID, 0666, "gsc%dd", unit);
   make_dev(&gsc_ops, ((unit<<6) + DBUG_MASK+FRMT_PBM),
-     GSC_UID,  GSC_GID, 0666, "gsc%dpd", unit);
+          GSC_UID,  GSC_GID, 0666, "gsc%dpd", unit);
 
   return ATTACH_SUCCESS;
 }
index a475f13..9214a31 100644 (file)
@@ -1104,8 +1104,7 @@ met_attach(pcici_t tag, int unit)
        mtr->frames = 1;        /* one frame */
 
        mtr->flags |= METEOR_INITALIZED | METEOR_AUTOMODE | METEOR_DEV0 |
-                  METEOR_RGB16;
-       dev_ops_add(&meteor_ops, -1, unit);
+                     METEOR_RGB16;
        make_dev(&meteor_ops, unit, 0, 0, 0644, "meteor");
 }
 
index 761a017..09538fa 100644 (file)
@@ -255,10 +255,6 @@ makeudev(int x, int y)
 /*
  * Create an internal or external device.
  *
- * Device majors can be overloaded and used directly by the kernel without
- * conflict, but userland will only see the particular device major that
- * has been installed with dev_ops_add().
- *
  * This routine creates and returns an unreferenced ad-hoc entry for the
  * device which will remain intact until the device is destroyed.  If the
  * caller intends to store the device pointer it must call reference_dev()
@@ -406,21 +402,6 @@ make_sub_dev(cdev_t odev, int minor)
        return (dev);
 }
 
-cdev_t
-get_dev(int x, int y)
-{
-       cdev_t dev;
-       struct dev_ops *ops;
-
-       if (x == NOUDEV)
-               return(NULL);
-       ops = dev_ops_get(x, y);
-       if (ops == NULL)
-               return(NULL);
-       dev = hashdev(ops, x, y, TRUE);
-       return(dev);
-}
-
 /*
  * destroy_dev() removes the adhoc association for a device and revectors
  * its ops to &dead_dev_ops.
@@ -437,52 +418,12 @@ destroy_dev(cdev_t dev)
 {
        int hash;
 
-       if (dev == NULL)
-               return;
-
-       devfs_debug(DEVFS_DEBUG_DEBUG, "destroy_dev called for %s\n", dev->si_name);
-       devfs_destroy_dev(dev);
-
-       return;
-
-       if ((dev->si_flags & SI_ADHOC) == 0) {
-               release_dev(dev);
-               return;
-       }
-       if (dev_ref_debug) {
-               kprintf("destroy   dev %p %s(minor=%08x) refs=%d\n", 
-                       dev, devtoname(dev), dev->si_uminor,
-                       dev->si_sysref.refcnt);
-       }
-       if (dev->si_sysref.refcnt < 2) {
-               kprintf("destroy_dev(): too few references on device! "
-                       "%p %s(minor=%08x) refs=%d\n",
-                   dev, devtoname(dev), dev->si_uminor,
-                   dev->si_sysref.refcnt);
-       }
-       dev->si_flags &= ~SI_ADHOC;
-       if (dev->si_flags & SI_HASHED) {
-               hash = __devthash(dev->si_umajor, dev->si_uminor);
-               LIST_REMOVE(dev, si_hash);
-               dev->si_flags &= ~SI_HASHED;
+       if (dev) {
+               devfs_debug(DEVFS_DEBUG_DEBUG,
+                           "destroy_dev called for %s\n",
+                           dev->si_name);
+               devfs_destroy_dev(dev);
        }
-
-       /*
-        * We have to release the ops reference before we replace the
-        * device switch with dead_dev_ops.
-        */
-
-
-       if (dead_dev_ops.d_strategy == NULL)
-               compile_dev_ops(&dead_dev_ops);
-       if (dev->si_ops && dev->si_ops != &dead_dev_ops)
-               dev_ops_release(dev->si_ops);
-       dev->si_drv1 = NULL;
-       dev->si_drv2 = NULL;
-       dev->si_ops = &dead_dev_ops;
-       sysref_put(&dev->si_sysref);    /* release adhoc association */
-
-       release_dev(dev);               /* release callers reference */
 }
 
 /*
index 99519b1..f6ced0f 100644 (file)
@@ -2675,10 +2675,9 @@ fildesc_drvinit(void *unused)
 {
        int fd;
 
-       dev_ops_add(&fildesc_ops, 0, 0);
        for (fd = 0; fd < NUMFDESC; fd++) {
                make_dev(&fildesc_ops, fd,
-                   UID_BIN, GID_BIN, 0666, "fd/%d", fd);
+                        UID_BIN, GID_BIN, 0666, "fd/%d", fd);
        }
 
        kprintf("fildesc_drvinit() building stdin, stdout, stderr: \n");
index ba160a8..8c5f869 100644 (file)
@@ -410,14 +410,6 @@ compile_dev_ops(struct dev_ops *ops)
 /*
  * This makes a dev_ops entry visible to userland (e.g /dev/<blah>).
  *
- * The kernel can overload a data space by making multiple dev_ops_add()
- * calls, but only the most recent one in the list matching the mask/match
- * will be visible to userland.
- *
- * make_dev() does not automatically call dev_ops_add() (nor do we want it
- * to, since partition-managed disk devices are overloaded on top of the
- * raw device).
- *
  * Disk devices typically register their major, e.g. 'ad0', and then call
  * into the disk label management code which overloads its own onto e.g. 'ad0'
  * to support all the various slice and partition combinations.
@@ -445,97 +437,11 @@ RB_GENERATE2(dev_ops_rb_tree, dev_ops_maj, rbnode, rb_dev_ops_compare, int, maj)
 
 struct dev_ops_rb_tree dev_ops_rbhead = RB_INITIALIZER(dev_ops_rbhead);
 
-int
-dev_ops_add(struct dev_ops *ops, u_int mask, u_int match)
-{
-       return 0;
-
-    static int next_maj = 256;         /* first dynamic major number */
-    struct dev_ops_maj *rbmaj;
-    struct dev_ops_link *link;
-
-    compile_dev_ops(ops);
-    if (ops->head.maj < 0) {
-       while (dev_ops_rb_tree_RB_LOOKUP(&dev_ops_rbhead, next_maj) != NULL) {
-               if (++next_maj <= 0)
-                       next_maj = 256;
-       }
-       ops->head.maj = next_maj;
-    }
-    rbmaj = dev_ops_rb_tree_RB_LOOKUP(&dev_ops_rbhead, ops->head.maj);
-    if (rbmaj == NULL) {
-       rbmaj = kmalloc(sizeof(*rbmaj), M_DEVBUF, M_INTWAIT | M_ZERO);
-       rbmaj->maj = ops->head.maj;
-       dev_ops_rb_tree_RB_INSERT(&dev_ops_rbhead, rbmaj);
-    }
-    for (link = rbmaj->link; link; link = link->next) {
-           /*
-            * If we get an exact match we usurp the target, but we only print
-            * a warning message if a different device switch is installed.
-            */
-           if (link->mask == mask && link->match == match) {
-                   if (link->ops != ops) {
-                           kprintf("WARNING: \"%s\" (%p) is usurping \"%s\"'s"
-                               " (%p)\n",
-                               ops->head.name, ops, 
-                               link->ops->head.name, link->ops);
-                           link->ops = ops;
-                           ++ops->head.refs;
-                   }
-                   return(0);
-           }
-           /*
-            * XXX add additional warnings for overlaps
-            */
-    }
-
-    link = kmalloc(sizeof(struct dev_ops_link), M_DEVBUF, M_INTWAIT|M_ZERO);
-    link->mask = mask;
-    link->match = match;
-    link->ops = ops;
-    link->next = rbmaj->link;
-    rbmaj->link = link;
-    ++ops->head.refs;
-    return(0);
-}
-
-/*
- * Should only be used by udev2dev().
- *
- * If the minor number is -1, we match the first ops we find for this
- * major.   If the mask is not -1 then multiple minor numbers can match
- * the same ops.
- *
- * Note that this function will return NULL if the minor number is not within
- * the bounds of the installed mask(s).
- *
- * The specified minor number should NOT include any major bits.
- */
-struct dev_ops *
-dev_ops_get(int x, int y)
-{
-       struct dev_ops_maj *rbmaj;
-       struct dev_ops_link *link;
-
-       return NULL;
-
-       rbmaj = dev_ops_rb_tree_RB_LOOKUP(&dev_ops_rbhead, x);
-       if (rbmaj == NULL)
-               return(NULL);
-       for (link = rbmaj->link; link; link = link->next) {
-               if (y == -1 || (link->mask & y) == link->match)
-                       return(link->ops);
-       }
-       return(NULL);
-}
-
 /*
  * Remove all matching dev_ops entries from the dev_ops_array[] major
  * array so no new user opens can be performed, and destroy all devices
  * installed in the hash table that are associated with this dev_ops.  (see
  * destroy_all_devs()).
- *
- * The mask and match should match a previous call to dev_ops_add*().
  */
 int
 dev_ops_remove(struct dev_ops *ops, u_int mask, u_int match)
index 032b293..7f8bb47 100644 (file)
@@ -560,7 +560,6 @@ mem_drvinit(void *unused)
        if (mem_range_softc.mr_op != NULL)
                mem_range_softc.mr_op->init(&mem_range_softc);
 
-       dev_ops_add(&mem_ops, 0xf0, 0);
        make_dev(&mem_ops, 0, UID_ROOT, GID_KMEM, 0640, "mem");
        make_dev(&mem_ops, 1, UID_ROOT, GID_KMEM, 0640, "kmem");
        make_dev(&mem_ops, 2, UID_ROOT, GID_WHEEL, 0666, "null");
index 57b1c92..943aa7e 100644 (file)
@@ -173,7 +173,6 @@ static struct dev_softc
 static void
 devinit(void)
 {
-       dev_ops_add(&devctl_ops, -1, 0);
        make_dev(&devctl_ops, 0, UID_ROOT, GID_WHEEL, 0600, "devctl");
        lockinit(&devsoftc.lock, "dev mtx", 0, 0);
        TAILQ_INIT(&devsoftc.devq);
index 11bb603..e2ea119 100644 (file)
@@ -250,7 +250,6 @@ logioctl(struct dev_ioctl_args *ap)
 static void
 log_drvinit(void *unused)
 {
-       dev_ops_add(&log_ops, 0, 0);
        make_dev(&log_ops, 0, UID_ROOT, GID_WHEEL, 0600, "klog");
 }
 
index 44e8e0e..f38fc9a 100644 (file)
@@ -537,9 +537,8 @@ cndbctl(int on)
 static void
 cn_drvinit(void *unused)
 {
-       dev_ops_add(&cn_ops, 0, 0);
        cn_devfsdev = make_only_devfs_dev(&cn_ops, 0, UID_ROOT, GID_WHEEL,
-                               0600, "console");
+                                         0600, "console");
 }
 
 SYSINIT(cndev,SI_SUB_DRIVERS,SI_ORDER_MIDDLE+CDEV_MAJOR,cn_drvinit,NULL)
index 23b4cfb..787ed8f 100644 (file)
@@ -861,8 +861,6 @@ static void
 ptc_drvinit(void *unused)
 {
        int i;
-       dev_ops_add(&pts_ops, 0, 0);
-       dev_ops_add(&ptc_ops, 0, 0);
 
        devfs_clone_bitmap_init(&DEVFS_CLONE_BITMAP(pty));
        devfs_clone_bitmap_init(&DEVFS_CLONE_BITMAP(pts));
index 9b73517..26be9f9 100644 (file)
@@ -256,7 +256,6 @@ cttypoll(struct dev_poll_args *ap)
 static void
 ctty_drvinit(void *unused __unused)
 {
-       dev_ops_add(&ctty_ops, 0, 0);
        make_dev(&ctty_ops, 0, 0, 0, 0666, "tty");
 }
 
index 705fd89..511b32b 100644 (file)
@@ -1504,7 +1504,6 @@ bpf_setdlt(struct bpf_d *d, u_int dlt)
 static void
 bpf_drvinit(void *unused)
 {
-       dev_ops_add(&bpf_ops, 0, 0);
        make_dev(&bpf_ops, 0, 0, 0, 0600, "bpf");
        devfs_clone_bitmap_init(&DEVFS_CLONE_BITMAP(bpf));
        devfs_clone_handler_add("bpf", bpfclone);
index 4205e46..6a0a835 100644 (file)
@@ -85,17 +85,6 @@ PSEUDO_SET(i4bctlattach, i4b_i4bctldrv);
 #define PDEVSTATIC     static
 
 /*---------------------------------------------------------------------------*
- *     initialization at kernel load time
- *---------------------------------------------------------------------------*/
-static void
-i4bctlinit(void *unused)
-{
-       dev_ops_add(&i4bctl_ops, 0, 0);
-}
-
-SYSINIT(i4bctldev, SI_SUB_DRIVERS,SI_ORDER_MIDDLE+CDEV_MAJOR, &i4bctlinit, NULL);
-
-/*---------------------------------------------------------------------------*
  *     interface attach routine
  *---------------------------------------------------------------------------*/
 PDEVSTATIC void
index 503c793..def0f14 100644 (file)
@@ -142,18 +142,6 @@ PSEUDO_SET(i4brbchattach, i4b_rbch);
  *===========================================================================*/
 
 /*---------------------------------------------------------------------------*
- *     initialization at kernel load time
- *---------------------------------------------------------------------------*/
-static void
-i4brbchinit(void *unused)
-{
-       dev_ops_add(&i4brbch_ops, 0, 0);
-}
-
-SYSINIT(i4brbchdev, SI_SUB_DRIVERS,
-       SI_ORDER_MIDDLE+CDEV_MAJOR, &i4brbchinit, NULL);
-
-/*---------------------------------------------------------------------------*
  *     interface attach routine
  *---------------------------------------------------------------------------*/
 PDEVSTATIC void
index b9fc1b7..859fef3 100644 (file)
@@ -167,18 +167,6 @@ PSEUDO_SET(i4btelattach, i4b_tel);
  *===========================================================================*/
 
 /*---------------------------------------------------------------------------*
- *     initialization at kernel load time
- *---------------------------------------------------------------------------*/
-PDEVSTATIC void
-i4btelinit(void *unused)
-{
-       dev_ops_add(&i4btel_ops, 0, 0);
-}
-
-SYSINIT(i4bteldev, SI_SUB_DRIVERS,
-       SI_ORDER_MIDDLE+CDEV_MAJOR, &i4btelinit, NULL);
-
-/*---------------------------------------------------------------------------*
  *     interface attach routine
  *---------------------------------------------------------------------------*/
 PDEVSTATIC void
index 83fb2d6..d200aac 100644 (file)
@@ -90,15 +90,6 @@ static struct dev_ops i4btrc_ops = {
 /*---------------------------------------------------------------------------*
  *     interface init routine
  *---------------------------------------------------------------------------*/
-static void
-i4btrcinit(void *unused)
-{
-       dev_ops_add(&i4btrc_ops, 0, 0);
-}
-
-SYSINIT(i4btrcdev, SI_SUB_DRIVERS,
-       SI_ORDER_MIDDLE+CDEV_MAJOR, &i4btrcinit, NULL);
-
 static void i4btrcattach(void *);
 PSEUDO_SET(i4btrcattach, i4b_trace);
 
index ee4576b..be392cc 100644 (file)
@@ -105,14 +105,6 @@ static struct dev_ops i4b_ops = {
 PDEVSTATIC void i4battach(void *);
 PSEUDO_SET(i4battach, i4b_i4bdrv);
 
-static void
-i4b_drvinit(void *unused)
-{
-       dev_ops_add(&i4b_ops, 0, 0);
-}
-
-SYSINIT(i4bdev,SI_SUB_DRIVERS,SI_ORDER_MIDDLE+CDEV_MAJOR,i4b_drvinit,NULL)
-
 /*---------------------------------------------------------------------------*
  *     interface attach routine
  *---------------------------------------------------------------------------*/
index 2bf470a..3bf7431 100644 (file)
@@ -3063,9 +3063,6 @@ pf_load(void)
        int error;
 
        init_zone_var();
-       error = dev_ops_add(&pf_ops, 0, 0);
-       if (error)
-               return (error);
        pf_dev = make_dev(&pf_ops, 0, 0, 0, 0600, PF_NAME);
        error = pfattach();
        if (error) {
index c451e36..de84334 100644 (file)
@@ -352,7 +352,6 @@ nsmb_dev_load(module_t mod, int cmd, void *arg)
                smb_iod_done();
                error = smb_sm_done();
                error = 0;
-               //dev_ops_remove(&nsmb_ops, 0, 0);
                dev_ops_remove_all(&nsmb_ops);
                kprintf("netsmb_dev: unloaded\n");
                break;
index 6da6147..d6d76c4 100644 (file)
@@ -782,9 +782,8 @@ cryptodev_modevent(module_t mod, int type, void *unused)
        case MOD_LOAD:
                if (bootverbose)
                        kprintf("crypto: <crypto device>\n");
-               dev_ops_add(&crypto_ops, 0, 0);
                make_dev(&crypto_ops, 0, UID_ROOT, GID_WHEEL,
-                       0666, "crypto");
+                        0666, "crypto");
                return 0;
        case MOD_UNLOAD:
                /*XXX disallow if active sessions */
index dee90ae..bce46bc 100644 (file)
@@ -300,7 +300,6 @@ apmpoll(struct dev_poll_args *ap)
 static void
 acpi_capm_init(struct acpi_softc *sc)
 {
-       dev_ops_add(&apm_ops, 0, 0);
         make_dev(&apm_ops, 0, 0, 5, 0664, "apm");
         make_dev(&apm_ops, 8, 0, 5, 0664, "apm");
        kprintf("Warning: ACPI is disabling APM's device.  You can't run both\n");
index d2ee2f0..fc4d5ac 100644 (file)
@@ -1090,7 +1090,6 @@ apm_attach(device_t dev)
 
        sc->initialized = 1;
 
-       dev_ops_add(&apm_ops, 0, 0);
        make_dev(&apm_ops, 0, UID_ROOT, GID_OPERATOR, 0660, "apm");
        make_dev(&apm_ops, 8, UID_ROOT, GID_OPERATOR, 0660, "apmctl");
        return 0;
index 7cad960..0dd0fe4 100644 (file)
@@ -138,9 +138,7 @@ elan_drvinit(void)
        if (elan_mmcr == NULL)
                return;
        kprintf("Elan-mmcr driver: MMCR at %p\n", elan_mmcr);
-       dev_ops_add(&elan_ops, 0, 0);
        make_dev(&elan_ops, 0, UID_ROOT, GID_WHEEL, 0600, "elan-mmcr");
-       return;
 }
 
 SYSINIT(elan, SI_SUB_PSEUDO, SI_ORDER_MIDDLE+CDEV_MAJOR,elan_drvinit,NULL);
index 04a1474..5503498 100644 (file)
@@ -80,7 +80,6 @@ static struct dev_ops perfmon_ops = {
 static void
 perfmon_driver_init(void *unused __unused)
 {
-       dev_ops_add(&perfmon_ops, 0xf0, 32);
        make_dev(&perfmon_ops, 32, UID_ROOT, GID_KMEM, 0640, "perfmon");
 }
 
index ac1840f..d437e50 100644 (file)
@@ -472,14 +472,13 @@ ascattach(struct isa_device *isdp)
     scu->selp.si_pid=(pid_t)0;
 #define ASC_UID 0
 #define ASC_GID 13
-  dev_ops_add(&asc_ops, 0xc0, unit << 6);
   make_dev(&asc_ops, unit<<6, ASC_UID, ASC_GID, 0666, "asc%d", unit);
   make_dev(&asc_ops, ((unit<<6) + FRMT_PBM),
-    ASC_UID,  ASC_GID, 0666, "asc%dp", unit);
+          ASC_UID,  ASC_GID, 0666, "asc%dp", unit);
   make_dev(&asc_ops, ((unit<<6) + DBUG_MASK),
-    ASC_UID,  ASC_GID, 0666, "asc%dd", unit);
+          ASC_UID,  ASC_GID, 0666, "asc%dd", unit);
   make_dev(&asc_ops, ((unit<<6) + DBUG_MASK+FRMT_PBM), 
-    ASC_UID, ASC_GID, 0666, "asc%dpd", unit);
+          ASC_UID, ASC_GID, 0666, "asc%dpd", unit);
   return ATTACH_SUCCESS;
 }
 
index 723c568..8a7223c 100644 (file)
@@ -300,7 +300,6 @@ apmpoll(struct dev_poll_args *ap)
 static void
 acpi_capm_init(struct acpi_softc *sc)
 {
-       dev_ops_add(&apm_ops, 0, 0);
         make_dev(&apm_ops, 0, 0, 5, 0664, "apm");
         make_dev(&apm_ops, 8, 0, 5, 0664, "apm");
        kprintf("Warning: ACPI is disabling APM's device.  You can't run both\n");
index 358c602..a40ca54 100644 (file)
@@ -1090,7 +1090,6 @@ apm_attach(device_t dev)
 
        sc->initialized = 1;
 
-       dev_ops_add(&apm_ops, 0, 0);
        make_dev(&apm_ops, 0, UID_ROOT, GID_OPERATOR, 0660, "apm");
        make_dev(&apm_ops, 8, UID_ROOT, GID_OPERATOR, 0660, "apmctl");
        return 0;
index fa68e82..6ee4773 100644 (file)
@@ -471,14 +471,13 @@ ascattach(struct isa_device *isdp)
     scu->selp.si_pid=(pid_t)0;
 #define ASC_UID 0
 #define ASC_GID 13
-  dev_ops_add(&asc_ops, 0xc0, unit << 6);
   make_dev(&asc_ops, unit<<6, ASC_UID, ASC_GID, 0666, "asc%d", unit);
   make_dev(&asc_ops, ((unit<<6) + FRMT_PBM),
-    ASC_UID,  ASC_GID, 0666, "asc%dp", unit);
+          ASC_UID,  ASC_GID, 0666, "asc%dp", unit);
   make_dev(&asc_ops, ((unit<<6) + DBUG_MASK),
-    ASC_UID,  ASC_GID, 0666, "asc%dd", unit);
+          ASC_UID,  ASC_GID, 0666, "asc%dd", unit);
   make_dev(&asc_ops, ((unit<<6) + DBUG_MASK+FRMT_PBM), 
-    ASC_UID, ASC_GID, 0666, "asc%dpd", unit);
+          ASC_UID, ASC_GID, 0666, "asc%dpd", unit);
   return ATTACH_SUCCESS;
 }
 
index 7d5efaa..b141725 100644 (file)
@@ -355,7 +355,6 @@ vconsinit_fini(struct consdev *cp)
        /*
         * Implement ttyv0-ttyv7.  At the moment ttyv1-7 are sink nulls.
         */
-       dev_ops_add(&vcons_ops, -1 & ~7, 0);
        for (i = 0; i < 8; ++i) {
                kprintf("vconsinit_fini(): make_dev for ttyv%d\n", i);
                dev = make_dev(&vcons_ops, i,
index 9f9ba9d..4daccca 100644 (file)
@@ -352,14 +352,12 @@ extern struct syslink_desc dev_kqfilter_desc;
 extern struct syslink_desc dev_clone_desc;
 
 void compile_dev_ops(struct dev_ops *);
-int dev_ops_add(struct dev_ops *, u_int mask, u_int match);
 int dev_ops_remove(struct dev_ops *, u_int mask, u_int match);
 int dev_ops_remove_all(struct dev_ops *ops);
 int dev_ops_remove_minor(struct dev_ops *ops, int minor);
 void dev_ops_release(struct dev_ops *);
 struct dev_ops *dev_ops_intercept(cdev_t, struct dev_ops *);
 void dev_ops_restore(cdev_t, struct dev_ops *);
-struct dev_ops *dev_ops_get(int x, int y);
 
 void destroy_all_devs(struct dev_ops *, u_int mask, u_int match);
 cdev_t make_dev(struct dev_ops *ops, int minor, uid_t uid, gid_t gid,
index 2ced6dd..2284d67 100644 (file)
@@ -316,7 +316,7 @@ mfs_mount(struct mount *mp, char *path, caddr_t data, struct ucred *cred)
 
        devvp->v_type = VCHR;
        dev = make_dev(&mfs_ops, minnum, UID_ROOT, GID_WHEEL, 0600,
-                       "MFS%d", minnum >> 16);
+                      "MFS%d", minnum >> 16);
        /* It is not clear that these will get initialized otherwise */
        dev->si_bsize_phys = DEV_BSIZE;
        dev->si_iosize_max = DFLTPHYS;
@@ -473,6 +473,5 @@ mfs_statfs(struct mount *mp, struct statfs *sbp, struct ucred *cred)
 static int
 mfs_init(struct vfsconf *vfsp)
 {
-       dev_ops_add(&mfs_ops, 0, 0);
        return (0);
 }