aboutsummaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorPoul-Henning Kamp <phk@FreeBSD.org>1999-08-23 20:59:21 +0000
committerPoul-Henning Kamp <phk@FreeBSD.org>1999-08-23 20:59:21 +0000
commit9dcbe2404a244059708f3bbc8cbfa0a14887c4ea (patch)
tree627cf9c78fb38268a3abc09deb78d86c316d87e6 /sys/dev
parentd9183205179005f7582d41a23d4588b0b1140298 (diff)
Notes
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/ata/ata-disk.c23
-rw-r--r--sys/dev/ata/ata-disk.h6
-rw-r--r--sys/dev/ata/atapi-all.c3
-rw-r--r--sys/dev/ata/atapi-cd.c30
-rw-r--r--sys/dev/ata/atapi-cd.h8
-rw-r--r--sys/dev/ata/atapi-fd.c18
-rw-r--r--sys/dev/ata/atapi-fd.h6
-rw-r--r--sys/dev/ata/atapi-tape.c13
-rw-r--r--sys/dev/ata/atapi-tape.h6
-rw-r--r--sys/dev/atkbdc/atkbd.c3
-rw-r--r--sys/dev/atkbdc/psm.c20
-rw-r--r--sys/dev/bktr/bktr_core.c27
-rw-r--r--sys/dev/cy/cy.c36
-rw-r--r--sys/dev/cy/cy_isa.c36
-rw-r--r--sys/dev/dgb/dgb.c56
-rw-r--r--sys/dev/dgb/dgm.c59
-rw-r--r--sys/dev/dpt/dpt.h10
-rw-r--r--sys/dev/dpt/dpt_pci.c3
-rw-r--r--sys/dev/fb/fb.c4
-rw-r--r--sys/dev/fdc/fdc.c120
-rw-r--r--sys/dev/joy/joy.c15
-rw-r--r--sys/dev/kbd/atkbd.c3
-rw-r--r--sys/dev/mcd/mcd.c39
-rw-r--r--sys/dev/mse/mse.c21
-rw-r--r--sys/dev/pci/pci.c29
-rw-r--r--sys/dev/ppbus/lpt.c23
-rw-r--r--sys/dev/rc/rc.c17
-rw-r--r--sys/dev/rp/rp.c9
-rw-r--r--sys/dev/scd/scd.c38
-rw-r--r--sys/dev/si/si.c47
-rw-r--r--sys/dev/sio/sio.c46
-rw-r--r--sys/dev/snp/snp.c29
-rw-r--r--sys/dev/speaker/spkr.c15
-rw-r--r--sys/dev/streams/streams.c22
-rw-r--r--sys/dev/syscons/syscons.h7
35 files changed, 148 insertions, 699 deletions
diff --git a/sys/dev/ata/ata-disk.c b/sys/dev/ata/ata-disk.c
index 22066428f601..854650127919 100644
--- a/sys/dev/ata/ata-disk.c
+++ b/sys/dev/ata/ata-disk.c
@@ -25,13 +25,11 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: ata-disk.c,v 1.16 1999/08/10 21:59:57 sos Exp $
+ * $Id: ata-disk.c,v 1.17 1999/08/14 11:40:33 phk Exp $
*/
#include "ata.h"
#include "atadisk.h"
-#include "opt_devfs.h"
-
#if NATA > 0 && NATADISK > 0
#include <sys/param.h>
@@ -47,9 +45,6 @@
#include <sys/fcntl.h>
#include <sys/conf.h>
#include <sys/stat.h>
-#ifdef DEVFS
-#include <sys/devfsext.h>
-#endif
#include <vm/vm.h>
#include <vm/vm_prot.h>
#include <vm/pmap.h>
@@ -236,18 +231,10 @@ ad_attach(void *notused)
DEVSTAT_NO_ORDERED_TAGS,
DEVSTAT_TYPE_DIRECT | DEVSTAT_TYPE_IF_IDE,
0x180);
-#ifdef DEVFS
- adp->cdevs_token = devfs_add_devswf(&ad_cdevsw,
- dkmakeminor(adp->lun, 0, 0),
- DV_CHR,
- UID_ROOT, GID_OPERATOR,
- 0640, "rad%d", adp->lun);
- adp->bdevs_token = devfs_add_devswf(&ad_cdevsw,
- dkmakeminor(adp->lun, 0, 0),
- DV_BLK,
- UID_ROOT, GID_OPERATOR,
- 0640, "ad%d", adp->lun);
-#endif
+ make_dev(&ad_cdevsw, dkmakeminor(adp->lun, 0, 0),
+ UID_ROOT, GID_OPERATOR, 0640, "rad%d", adp->lun);
+ make_dev(&ad_cdevsw, dkmakeminor(adp->lun, 0, 0),
+ UID_ROOT, GID_OPERATOR, 0640, "ad%d", adp->lun);
bufq_init(&adp->queue);
adtab[adnlun++] = adp;
}
diff --git a/sys/dev/ata/ata-disk.h b/sys/dev/ata/ata-disk.h
index ad9a0d3734e6..db4147bd1c83 100644
--- a/sys/dev/ata/ata-disk.h
+++ b/sys/dev/ata/ata-disk.h
@@ -25,7 +25,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: ata-disk.h,v 1.6 1999/05/20 09:12:03 sos Exp $
+ * $Id: ata-disk.h,v 1.7 1999/06/25 09:03:00 sos Exp $
*/
/* ATA device parameter information */
@@ -140,10 +140,6 @@ struct ad_softc {
struct buf_queue_head queue; /* head of request queue */
struct devstat stats; /* devstat entry */
-#ifdef DEVFS
- void *cdevs_token;
- void *bdevs_token;
-#endif
};
struct ad_request {
diff --git a/sys/dev/ata/atapi-all.c b/sys/dev/ata/atapi-all.c
index e85bbbd8b6e5..ff13d462fcb9 100644
--- a/sys/dev/ata/atapi-all.c
+++ b/sys/dev/ata/atapi-all.c
@@ -25,14 +25,13 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: atapi-all.c,v 1.10 1999/06/25 09:03:01 sos Exp $
+ * $Id: atapi-all.c,v 1.11 1999/08/10 21:59:58 sos Exp $
*/
#include "ata.h"
#include "atapicd.h"
#include "atapist.h"
#include "atapifd.h"
-#include "opt_devfs.h"
#if NATA > 0
diff --git a/sys/dev/ata/atapi-cd.c b/sys/dev/ata/atapi-cd.c
index a0cf35ad5c29..439c4d69e75d 100644
--- a/sys/dev/ata/atapi-cd.c
+++ b/sys/dev/ata/atapi-cd.c
@@ -25,12 +25,11 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: atapi-cd.c,v 1.10 1999/05/31 11:24:27 phk Exp $
+ * $Id: atapi-cd.c,v 1.11 1999/06/25 09:03:04 sos Exp $
*/
#include "ata.h"
#include "atapicd.h"
-#include "opt_devfs.h"
#if NATA > 0 && NATAPICD > 0
@@ -47,9 +46,6 @@
#include <sys/fcntl.h>
#include <sys/conf.h>
#include <sys/stat.h>
-#ifdef DEVFS
-#include <sys/devfsext.h>
-#endif
#include <pci/pcivar.h>
#include <dev/ata/ata-all.h>
#include <dev/ata/atapi-all.h>
@@ -239,22 +235,14 @@ acd_init_lun(struct atapi_softc *atp, int32_t lun, struct devstat *stats)
}
else
acd->stats = stats;
-#ifdef DEVFS
- acd->a_cdevfs_token = devfs_add_devswf(&acd_cdevsw, dkmakeminor(lun, 0, 0),
- DV_CHR, UID_ROOT, GID_OPERATOR, 0644,
- "racd%da", lun);
- acd->c_cdevfs_token = devfs_add_devswf(&acd_cdevsw,
- dkmakeminor(lun, 0, RAW_PART),
- DV_CHR, UID_ROOT, GID_OPERATOR, 0644,
- "racd%dc", lun);
- acd->a_bdevfs_token = devfs_add_devswf(&acd_cdevsw, dkmakeminor(lun, 0, 0),
- DV_BLK, UID_ROOT, GID_OPERATOR, 0644,
- "acd%da", lun);
- acd->c_bdevfs_token = devfs_add_devswf(&acd_cdevsw,
- dkmakeminor(lun, 0, RAW_PART),
- DV_BLK, UID_ROOT, GID_OPERATOR, 0644,
- "acd%dc", lun);
-#endif
+ make_dev(&acd_cdevsw, dkmakeminor(lun, 0, 0),
+ UID_ROOT, GID_OPERATOR, 0644, "racd%da", lun);
+ make_dev(&acd_cdevsw, dkmakeminor(lun, 0, RAW_PART),
+ UID_ROOT, GID_OPERATOR, 0644, "racd%dc", lun);
+ make_dev(&acd_cdevsw, dkmakeminor(lun, 0, 0),
+ UID_ROOT, GID_OPERATOR, 0644, "acd%da", lun);
+ make_dev(&acd_cdevsw, dkmakeminor(lun, 0, RAW_PART),
+ UID_ROOT, GID_OPERATOR, 0644, "acd%dc", lun);
return acd;
}
diff --git a/sys/dev/ata/atapi-cd.h b/sys/dev/ata/atapi-cd.h
index 253198983b17..95a0af6323cd 100644
--- a/sys/dev/ata/atapi-cd.h
+++ b/sys/dev/ata/atapi-cd.h
@@ -25,7 +25,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: atapi-cd.h,v 1.1 1999/03/01 21:19:18 sos Exp $
+ * $Id: atapi-cd.h,v 1.2 1999/03/03 21:10:29 sos Exp $
*/
/* CDROM Table Of Contents */
@@ -334,12 +334,6 @@ struct acd_softc {
u_int32_t next_writeable_lba; /* next writable position */
struct wormio_prepare_track preptrack; /* scratch region */
struct devstat *stats; /* devstat entry */
-#ifdef DEVFS
- void *a_cdevfs_token;
- void *c_cdevfs_token;
- void *a_bdevfs_token;
- void *c_bdevfs_token;
-#endif
};
#define CDRIOCBLANK _IO('c',100) /* blank a CDRW disc */
diff --git a/sys/dev/ata/atapi-fd.c b/sys/dev/ata/atapi-fd.c
index 13684b44f7f0..f8c386598a1d 100644
--- a/sys/dev/ata/atapi-fd.c
+++ b/sys/dev/ata/atapi-fd.c
@@ -25,12 +25,11 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: atapi-fd.c,v 1.11 1999/06/25 09:03:05 sos Exp $
+ * $Id: atapi-fd.c,v 1.12 1999/08/14 11:40:33 phk Exp $
*/
#include "ata.h"
#include "atapifd.h"
-#include "opt_devfs.h"
#if NATA > 0 && NATAPIFD > 0
@@ -48,9 +47,6 @@
#include <sys/fcntl.h>
#include <sys/conf.h>
#include <sys/stat.h>
-#ifdef DEVFS
-#include <sys/devfsext.h>
-#endif
#include <pci/pcivar.h>
#include <dev/ata/ata-all.h>
#include <dev/ata/atapi-all.h>
@@ -137,14 +133,10 @@ afdattach(struct atapi_softc *atp)
DEVSTAT_NO_ORDERED_TAGS,
DEVSTAT_TYPE_DIRECT | DEVSTAT_TYPE_IF_IDE,
0x174);
-#ifdef DEVFS
- fdp->cdevs_token = devfs_add_devswf(&afd_cdevsw, dkmakeminor(fdp->lun, 0,0),
- DV_CHR, UID_ROOT, GID_OPERATOR,
- 0640, "rafd%d", fdp->lun);
- fdp->bdevs_token = devfs_add_devswf(&afd_cdevsw, dkmakeminor(fdp->lun, 0,0),
- DV_BLK, UID_ROOT, GID_OPERATOR,
- 0640, "afd%d", fdp->lun);
-#endif
+ make_dev(&afd_cdevsw, dkmakeminor(fdp->lun, 0,0),
+ UID_ROOT, GID_OPERATOR, 0640, "rafd%d", fdp->lun);
+ make_dev(&afd_cdevsw, dkmakeminor(fdp->lun, 0,0),
+ UID_ROOT, GID_OPERATOR, 0640, "afd%d", fdp->lun);
return 0;
}
diff --git a/sys/dev/ata/atapi-fd.h b/sys/dev/ata/atapi-fd.h
index 4d6a6d25b102..59babb0d0035 100644
--- a/sys/dev/ata/atapi-fd.h
+++ b/sys/dev/ata/atapi-fd.h
@@ -25,7 +25,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: atapi-fd.h,v 1.1 1999/03/03 21:10:29 sos Exp $
+ * $Id: atapi-fd.h,v 1.2 1999/05/20 09:12:06 sos Exp $
*/
/* MODE SENSE parameter header */
@@ -82,9 +82,5 @@ struct afd_softc {
struct afd_cappage cap; /* capabilities page info */
struct diskslices *slices; /* virtual drives */
struct devstat stats;
-#ifdef DEVFS
- void *cdevs_token;
- void *bdevs_token;
-#endif
};
diff --git a/sys/dev/ata/atapi-tape.c b/sys/dev/ata/atapi-tape.c
index 3f618c88858f..8dc2044d6607 100644
--- a/sys/dev/ata/atapi-tape.c
+++ b/sys/dev/ata/atapi-tape.c
@@ -25,12 +25,11 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: atapi-tape.c,v 1.10 1999/05/31 11:24:30 phk Exp $
+ * $Id: atapi-tape.c,v 1.11 1999/06/25 09:03:06 sos Exp $
*/
#include "ata.h"
#include "atapist.h"
-#include "opt_devfs.h"
#if NATA > 0 && NATAPIST > 0
@@ -43,9 +42,6 @@
#include <sys/mtio.h>
#include <sys/disklabel.h>
#include <sys/devicestat.h>
-#ifdef DEVFS
-#include <sys/devfsext.h>
-#endif
#include <machine/clock.h>
#include <pci/pcivar.h>
#include <dev/ata/ata-all.h>
@@ -136,11 +132,8 @@ astattach(struct atapi_softc *atp)
DEVSTAT_NO_ORDERED_TAGS,
DEVSTAT_TYPE_SEQUENTIAL | DEVSTAT_TYPE_IF_IDE,
0x170);
-#ifdef DEVFS
- stp->cdevs_token = devfs_add_devswf(&ast_cdevsw, dkmakeminor(stp->lun, 0,0),
- DV_CHR, UID_ROOT, GID_OPERATOR, 0640,
- "rast%d", stp->lun);
-#endif
+ make_dev(&ast_cdevsw, dkmakeminor(stp->lun, 0,0),
+ UID_ROOT, GID_OPERATOR, 0640, "rast%d", stp->lun);
return 0;
}
diff --git a/sys/dev/ata/atapi-tape.h b/sys/dev/ata/atapi-tape.h
index 666ac968ee8d..9c6122597357 100644
--- a/sys/dev/ata/atapi-tape.h
+++ b/sys/dev/ata/atapi-tape.h
@@ -25,7 +25,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: atapi-tape.h,v 1.3 1999/03/07 21:49:14 sos Exp $
+ * $Id: atapi-tape.h,v 1.4 1999/06/25 09:03:07 sos Exp $
*/
/* MODE SENSE parameter header */
@@ -86,8 +86,4 @@ struct ast_softc {
struct ast_header header; /* MODE SENSE param header */
struct ast_cappage cap; /* capabilities page info */
struct devstat stats; /* devstat entry */
-#ifdef DEVFS
- void *cdevs_token;
- void *bdevs_token;
-#endif
};
diff --git a/sys/dev/atkbdc/atkbd.c b/sys/dev/atkbdc/atkbd.c
index 0d00ee6773e6..3786ee9a0b98 100644
--- a/sys/dev/atkbdc/atkbd.c
+++ b/sys/dev/atkbdc/atkbd.c
@@ -23,13 +23,12 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: atkbd.c,v 1.13 1999/08/15 06:06:14 yokota Exp $
+ * $Id: atkbd.c,v 1.14 1999/08/22 09:52:32 yokota Exp $
*/
#include "atkbd.h"
#include "opt_kbd.h"
#include "opt_atkbd.h"
-#include "opt_devfs.h"
#if NATKBD > 0
diff --git a/sys/dev/atkbdc/psm.c b/sys/dev/atkbdc/psm.c
index bdc39dc665bb..e7c82c97dd47 100644
--- a/sys/dev/atkbdc/psm.c
+++ b/sys/dev/atkbdc/psm.c
@@ -20,7 +20,7 @@
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: psm.c,v 1.15 1999/08/17 12:14:13 yokota Exp $
+ * $Id: psm.c,v 1.16 1999/08/22 06:11:52 yokota Exp $
*/
/*
@@ -65,7 +65,6 @@
#ifdef __i386__
#include "apm.h"
#endif
-#include "opt_devfs.h"
#include "opt_psm.h"
#if NPSM > 0
@@ -81,9 +80,6 @@
#include <sys/malloc.h>
#include <machine/bus.h>
#include <sys/rman.h>
-#ifdef DEVFS
-#include <sys/devfsext.h>
-#endif
#include <sys/select.h>
#include <sys/uio.h>
@@ -181,10 +177,6 @@ struct psm_softc { /* Driver status information */
int button; /* the latest button state */
int xold; /* previous absolute X position */
int yold; /* previous absolute Y position */
-#ifdef DEVFS
- void *devfs_token;
- void *b_devfs_token;
-#endif
#ifdef PSM_HOOKAPM
struct apmhook resumehook;
#endif
@@ -1094,14 +1086,8 @@ psmattach(device_t dev)
sc->state = PSM_VALID;
/* Done */
-#ifdef DEVFS
- sc->devfs_token =
- devfs_add_devswf(&psm_cdevsw, PSM_MKMINOR(unit, FALSE),
- DV_CHR, 0, 0, 0666, "psm%d", unit);
- sc->b_devfs_token =
- devfs_add_devswf(&psm_cdevsw, PSM_MKMINOR(unit, TRUE),
- DV_CHR, 0, 0, 0666, "bpsm%d", unit);
-#endif /* DEVFS */
+ make_dev(&psm_cdevsw, PSM_MKMINOR(unit, FALSE), 0, 0, 0666, "psm%d", unit);
+ make_dev(&psm_cdevsw, PSM_MKMINOR(unit, TRUE), 0, 0, 0666, "bpsm%d", unit);
#ifdef PSM_HOOKAPM
sc->resumehook.ah_name = "PS/2 mouse";
diff --git a/sys/dev/bktr/bktr_core.c b/sys/dev/bktr/bktr_core.c
index 1c5cfdde2e84..27b73d013a7d 100644
--- a/sys/dev/bktr/bktr_core.c
+++ b/sys/dev/bktr/bktr_core.c
@@ -1,4 +1,4 @@
-/* $Id: brooktree848.c,v 1.85 1999/06/12 14:54:54 roger Exp $ */
+/* $Id: brooktree848.c,v 1.89 1999/07/12 15:51:48 roger Exp $ */
/* BT848 Driver for Brooktree's Bt848, Bt848A, Bt849A, Bt878, Bt879 based cards.
The Brooktree BT848 Driver driver is based upon Mark Tinguely and
Jim Lowe's driver for the Matrox Meteor PCI card . The
@@ -444,7 +444,6 @@ They are unrelated to Revision Control numbering of FreeBSD or any other system.
#ifdef __FreeBSD__
#include "bktr.h"
#include "opt_bktr.h"
-#include "opt_devfs.h"
#include "pci.h"
#endif /* __FreeBSD__ */
@@ -485,10 +484,6 @@ They are unrelated to Revision Control numbering of FreeBSD or any other system.
#define NSMBUS 0
#endif
-#ifdef DEVFS
-#include <sys/devfsext.h>
-#endif /* DEVFS */
-
#if (__FreeBSD_version >=400000) || (NSMBUS > 0)
#include <sys/bus.h> /* used by smbus and newbus */
#endif
@@ -6961,13 +6956,9 @@ bktr_attach( device_t dev )
/* call the common attach code */
common_bktr_attach( bktr, unit, fun, rev );
-#ifdef DEVFS
- /* XXX This just throw away the token, which should probably be fixed when
- DEVFS is finally made really operational. */
- devfs_add_devswf(&bktr_cdevsw, unit, DV_CHR, 0, 0, 0444, "bktr%d", unit);
- devfs_add_devswf(&bktr_cdevsw, unit+16, DV_CHR, 0, 0, 0444, "tuner%d", unit);
- devfs_add_devswf(&bktr_cdevsw, unit+32, DV_CHR, 0, 0, 0444, "vbi%d", unit);
-#endif /* DEVFS */
+ make_dev(&bktr_cdevsw, unit, 0, 0, 0444, "bktr%d", unit);
+ make_dev(&bktr_cdevsw, unit+16, 0, 0, 0444, "tuner%d", unit);
+ make_dev(&bktr_cdevsw, unit+32, 0, 0, 0444, "vbi%d", unit);
return 0;
@@ -7473,13 +7464,9 @@ bktr_attach( pcici_t tag, int unit )
/* call the common attach code */
common_bktr_attach( bktr, unit, fun, rev );
-#ifdef DEVFS
- /* XXX This just throw away the token, which should probably be fixed when
- DEVFS is finally made really operational. */
- devfs_add_devswf(&bktr_cdevsw, unit, DV_CHR, 0, 0, 0444, "bktr%d", unit);
- devfs_add_devswf(&bktr_cdevsw, unit+16, DV_CHR, 0, 0, 0444, "tuner%d", unit);
- devfs_add_devswf(&bktr_cdevsw, unit+32, DV_CHR, 0, 0, 0444, "vbi%d", unit);
-#endif /* DEVFS */
+ make_dev(&bktr_cdevsw, unit, 0, 0, 0444, "bktr%d", unit);
+ make_dev(&bktr_cdevsw, unit+16, 0, 0, 0444, "tuner%d", unit);
+ make_dev(&bktr_cdevsw, unit+32, 0, 0, 0444, "vbi%d", unit);
}
diff --git a/sys/dev/cy/cy.c b/sys/dev/cy/cy.c
index 48ecb9ff8c6f..56b0bbc3621f 100644
--- a/sys/dev/cy/cy.c
+++ b/sys/dev/cy/cy.c
@@ -27,12 +27,10 @@
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: cy.c,v 1.90 1999/05/31 11:25:57 phk Exp $
+ * $Id: cy.c,v 1.91 1999/06/04 18:13:25 bde Exp $
*/
#include "opt_compat.h"
-#include "opt_devfs.h"
-
#include "cy.h"
/*
@@ -80,10 +78,6 @@
#include <sys/kernel.h>
#include <sys/malloc.h>
#include <sys/syslog.h>
-#ifdef DEVFS
-#include <sys/devfsext.h>
-#endif
-
#include <machine/clock.h>
#include <machine/ipl.h>
#ifndef SMP
@@ -325,14 +319,6 @@ struct com_s {
*/
u_char obuf1[256];
u_char obuf2[256];
-#ifdef DEVFS
- void *devfs_token_ttyd;
- void *devfs_token_ttyl;
- void *devfs_token_ttyi;
- void *devfs_token_cuaa;
- void *devfs_token_cual;
- void *devfs_token_cuai;
-#endif
};
/* PCI driver entry point. */
@@ -636,32 +622,24 @@ cyattach_common(cy_iobase, cy_align)
register_swi(SWI_TTY, siopoll);
sio_registered = TRUE;
}
-#ifdef DEVFS
- com->devfs_token_ttyd = devfs_add_devswf(&sio_cdevsw,
- unit, DV_CHR,
+ make_dev(&sio_cdevsw, unit,
UID_ROOT, GID_WHEEL, 0600, "ttyc%r%r", adapter,
unit % CY_MAX_PORTS);
- com->devfs_token_ttyi = devfs_add_devswf(&sio_cdevsw,
- unit | CONTROL_INIT_STATE, DV_CHR,
+ make_dev(&sio_cdevsw, unit | CONTROL_INIT_STATE,
UID_ROOT, GID_WHEEL, 0600, "ttyic%r%r", adapter,
unit % CY_MAX_PORTS);
- com->devfs_token_ttyl = devfs_add_devswf(&sio_cdevsw,
- unit | CONTROL_LOCK_STATE, DV_CHR,
+ make_dev(&sio_cdevsw, unit | CONTROL_LOCK_STATE,
UID_ROOT, GID_WHEEL, 0600, "ttylc%r%r", adapter,
unit % CY_MAX_PORTS);
- com->devfs_token_cuaa = devfs_add_devswf(&sio_cdevsw,
- unit | CALLOUT_MASK, DV_CHR,
+ make_dev(&sio_cdevsw, unit | CALLOUT_MASK,
UID_UUCP, GID_DIALER, 0660, "cuac%r%r", adapter,
unit % CY_MAX_PORTS);
- com->devfs_token_cuai = devfs_add_devswf(&sio_cdevsw,
- unit | CALLOUT_MASK | CONTROL_INIT_STATE, DV_CHR,
+ make_dev(&sio_cdevsw, unit | CALLOUT_MASK | CONTROL_INIT_STATE,
UID_UUCP, GID_DIALER, 0660, "cuaic%r%r", adapter,
unit % CY_MAX_PORTS);
- com->devfs_token_cual = devfs_add_devswf(&sio_cdevsw,
- unit | CALLOUT_MASK | CONTROL_LOCK_STATE, DV_CHR,
+ make_dev(&sio_cdevsw, unit | CALLOUT_MASK | CONTROL_LOCK_STATE,
UID_UUCP, GID_DIALER, 0660, "cualc%r%r", adapter,
unit % CY_MAX_PORTS);
-#endif
}
}
diff --git a/sys/dev/cy/cy_isa.c b/sys/dev/cy/cy_isa.c
index 48ecb9ff8c6f..56b0bbc3621f 100644
--- a/sys/dev/cy/cy_isa.c
+++ b/sys/dev/cy/cy_isa.c
@@ -27,12 +27,10 @@
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: cy.c,v 1.90 1999/05/31 11:25:57 phk Exp $
+ * $Id: cy.c,v 1.91 1999/06/04 18:13:25 bde Exp $
*/
#include "opt_compat.h"
-#include "opt_devfs.h"
-
#include "cy.h"
/*
@@ -80,10 +78,6 @@
#include <sys/kernel.h>
#include <sys/malloc.h>
#include <sys/syslog.h>
-#ifdef DEVFS
-#include <sys/devfsext.h>
-#endif
-
#include <machine/clock.h>
#include <machine/ipl.h>
#ifndef SMP
@@ -325,14 +319,6 @@ struct com_s {
*/
u_char obuf1[256];
u_char obuf2[256];
-#ifdef DEVFS
- void *devfs_token_ttyd;
- void *devfs_token_ttyl;
- void *devfs_token_ttyi;
- void *devfs_token_cuaa;
- void *devfs_token_cual;
- void *devfs_token_cuai;
-#endif
};
/* PCI driver entry point. */
@@ -636,32 +622,24 @@ cyattach_common(cy_iobase, cy_align)
register_swi(SWI_TTY, siopoll);
sio_registered = TRUE;
}
-#ifdef DEVFS
- com->devfs_token_ttyd = devfs_add_devswf(&sio_cdevsw,
- unit, DV_CHR,
+ make_dev(&sio_cdevsw, unit,
UID_ROOT, GID_WHEEL, 0600, "ttyc%r%r", adapter,
unit % CY_MAX_PORTS);
- com->devfs_token_ttyi = devfs_add_devswf(&sio_cdevsw,
- unit | CONTROL_INIT_STATE, DV_CHR,
+ make_dev(&sio_cdevsw, unit | CONTROL_INIT_STATE,
UID_ROOT, GID_WHEEL, 0600, "ttyic%r%r", adapter,
unit % CY_MAX_PORTS);
- com->devfs_token_ttyl = devfs_add_devswf(&sio_cdevsw,
- unit | CONTROL_LOCK_STATE, DV_CHR,
+ make_dev(&sio_cdevsw, unit | CONTROL_LOCK_STATE,
UID_ROOT, GID_WHEEL, 0600, "ttylc%r%r", adapter,
unit % CY_MAX_PORTS);
- com->devfs_token_cuaa = devfs_add_devswf(&sio_cdevsw,
- unit | CALLOUT_MASK, DV_CHR,
+ make_dev(&sio_cdevsw, unit | CALLOUT_MASK,
UID_UUCP, GID_DIALER, 0660, "cuac%r%r", adapter,
unit % CY_MAX_PORTS);
- com->devfs_token_cuai = devfs_add_devswf(&sio_cdevsw,
- unit | CALLOUT_MASK | CONTROL_INIT_STATE, DV_CHR,
+ make_dev(&sio_cdevsw, unit | CALLOUT_MASK | CONTROL_INIT_STATE,
UID_UUCP, GID_DIALER, 0660, "cuaic%r%r", adapter,
unit % CY_MAX_PORTS);
- com->devfs_token_cual = devfs_add_devswf(&sio_cdevsw,
- unit | CALLOUT_MASK | CONTROL_LOCK_STATE, DV_CHR,
+ make_dev(&sio_cdevsw, unit | CALLOUT_MASK | CONTROL_LOCK_STATE,
UID_UUCP, GID_DIALER, 0660, "cualc%r%r", adapter,
unit % CY_MAX_PORTS);
-#endif
}
}
diff --git a/sys/dev/dgb/dgb.c b/sys/dev/dgb/dgb.c
index e16c979f75e3..3e7e14e5f24c 100644
--- a/sys/dev/dgb/dgb.c
+++ b/sys/dev/dgb/dgb.c
@@ -1,5 +1,5 @@
/*-
- * dgb.c $Id: dgb.c,v 1.49 1999/05/30 16:51:56 phk Exp $
+ * dgb.c $Id: dgb.c,v 1.50 1999/05/31 11:25:31 phk Exp $
*
* Digiboard driver.
*
@@ -28,7 +28,6 @@
*/
#include "opt_compat.h"
-#include "opt_devfs.h"
#include "opt_dgb.h"
#include "dgb.h"
@@ -55,9 +54,6 @@
#include <sys/fcntl.h>
#include <sys/kernel.h>
#include <sys/sysctl.h>
-#ifdef DEVFS
-#include <sys/devfsext.h>
-#endif /*DEVFS*/
#include <machine/clock.h>
@@ -148,16 +144,6 @@ struct dgb_p {
u_char draining; /* port is being drained now */
u_char used; /* port is being used now */
u_char mustdrain; /* data must be waited to drain in dgbparam() */
-#ifdef DEVFS
- struct {
- void *tty;
- void *ttyi;
- void *ttyl;
- void *cua;
- void *cuai;
- void *cual;
- } devfs_token;
-#endif
};
/* Digiboard per-board structure */
@@ -546,9 +532,7 @@ dgbattach(dev)
ushort *pstat;
int lowwater;
static int nports=0;
-#ifdef DEVFS
char suffix;
-#endif
if(sc->status!=ENABLED) {
DPRINT2(DB_EXCEPT,"dbg%d: try to attach a disabled card\n",unit);
@@ -917,39 +901,25 @@ load_fep:
termioschars(&port->it_in);
port->it_in.c_ispeed = port->it_in.c_ospeed = dgbdefaultrate;
port->it_out = port->it_in;
-#ifdef DEVFS
/* MAX_DGB_PORTS is 32 => [0-9a-v] */
suffix = i < 10 ? '0' + i : 'a' + i - 10;
- port->devfs_token.tty =
- devfs_add_devswf(&dgb_cdevsw, (unit*32)+i,
- DV_CHR, UID_ROOT, GID_WHEEL, 0600,
- "ttyD%d%c", unit, suffix);
+ make_dev(&dgb_cdevsw, (unit*32)+i,
+ UID_ROOT, GID_WHEEL, 0600, "ttyD%d%c", unit, suffix);
- port->devfs_token.ttyi =
- devfs_add_devswf(&dgb_cdevsw, (unit*32)+i+32,
- DV_CHR, UID_ROOT, GID_WHEEL, 0600,
- "ttyiD%d%c", unit, suffix);
+ make_dev(&dgb_cdevsw, (unit*32)+i+32,
+ UID_ROOT, GID_WHEEL, 0600, "ttyiD%d%c", unit, suffix);
- port->devfs_token.ttyl =
- devfs_add_devswf(&dgb_cdevsw, (unit*32)+i+64,
- DV_CHR, UID_ROOT, GID_WHEEL, 0600,
- "ttylD%d%c", unit, suffix);
+ make_dev(&dgb_cdevsw, (unit*32)+i+64,
+ UID_ROOT, GID_WHEEL, 0600, "ttylD%d%c", unit, suffix);
- port->devfs_token.cua =
- devfs_add_devswf(&dgb_cdevsw, (unit*32)+i+128,
- DV_CHR, UID_UUCP, GID_DIALER, 0660,
- "cuaD%d%c", unit, suffix);
+ make_dev(&dgb_cdevsw, (unit*32)+i+128,
+ UID_UUCP, GID_DIALER, 0660, "cuaD%d%c", unit, suffix);
- port->devfs_token.cuai =
- devfs_add_devswf(&dgb_cdevsw, (unit*32)+i+160,
- DV_CHR, UID_UUCP, GID_DIALER, 0660,
- "cuaiD%d%c", unit, suffix);
+ make_dev(&dgb_cdevsw, (unit*32)+i+160,
+ UID_UUCP, GID_DIALER, 0660, "cuaiD%d%c", unit, suffix);
- port->devfs_token.cual =
- devfs_add_devswf(&dgb_cdevsw, (unit*32)+i+192,
- DV_CHR, UID_UUCP, GID_DIALER, 0660,
- "cualD%d%c", unit, suffix);
-#endif
+ make_dev(&dgb_cdevsw, (unit*32)+i+192,
+ UID_UUCP, GID_DIALER, 0660, "cualD%d%c", unit, suffix);
}
hidewin(sc);
diff --git a/sys/dev/dgb/dgm.c b/sys/dev/dgb/dgm.c
index 6fa36ba12d46..b289be432d50 100644
--- a/sys/dev/dgb/dgm.c
+++ b/sys/dev/dgb/dgm.c
@@ -1,5 +1,5 @@
/*-
- * $Id: dgm.c,v 1.14 1999/05/30 16:51:58 phk Exp $
+ * $Id: dgm.c,v 1.15 1999/05/31 11:25:33 phk Exp $
*
* This driver and the associated header files support the ISA PC/Xem
* Digiboards. Its evolutionary roots are described below.
@@ -32,7 +32,6 @@
*/
#include "opt_compat.h"
-#include "opt_devfs.h"
#include "dgm.h"
@@ -59,9 +58,6 @@
#include <sys/fcntl.h>
#include <sys/kernel.h>
#include <sys/sysctl.h>
-#ifdef DEVFS
-#include <sys/devfsext.h>
-#endif
#include <machine/clock.h>
@@ -150,16 +146,6 @@ struct dgm_p {
u_char draining; /* port is being drained now */
u_char used; /* port is being used now */
u_char mustdrain; /* data must be waited to drain in dgmparam() */
-#ifdef DEVFS
- struct {
- void *tty;
- void *ttyi;
- void *ttyl;
- void *cua;
- void *cuai;
- void *cual;
- } devfs_token;
-#endif
};
/* Digiboard per-board structure */
@@ -726,37 +712,18 @@ dgmattach(dev)
termioschars(&port->it_in);
port->it_in.c_ispeed = port->it_in.c_ospeed = dgmdefaultrate;
port->it_out = port->it_in;
-#ifdef DEVFS
- port->devfs_token.tty =
- devfs_add_devswf(&dgm_cdevsw, (unit*65536)+i,
- DV_CHR, UID_ROOT, GID_WHEEL, 0600,
- "ttyM%d%x", unit, i + 0xa0);
-
- port->devfs_token.ttyi =
- devfs_add_devswf(&dgm_cdevsw, (unit*65536)+i+64,
- DV_CHR, UID_ROOT, GID_WHEEL, 0600,
- "ttyiM%d%x", unit, i + 0xa0);
-
- port->devfs_token.ttyl =
- devfs_add_devswf(&dgm_cdevsw, (unit*65536)+i+128,
- DV_CHR, UID_ROOT, GID_WHEEL, 0600,
- "ttylM%d%x", unit, i + 0xa0);
-
- port->devfs_token.cua =
- devfs_add_devswf(&dgm_cdevsw, (unit*65536)+i+262144,
- DV_CHR, UID_UUCP, GID_DIALER, 0660,
- "cuaM%d%x", unit, i + 0xa0);
-
- port->devfs_token.cuai =
- devfs_add_devswf(&dgm_cdevsw, (unit*65536)+i+262208,
- DV_CHR, UID_UUCP, GID_DIALER, 0660,
- "cuaiM%d%x", unit, i + 0xa0);
-
- port->devfs_token.cual =
- devfs_add_devswf(&dgm_cdevsw, (unit*65536)+i+262272,
- DV_CHR, UID_UUCP, GID_DIALER, 0660,
- "cualM%d%x", unit, i + 0xa0);
-#endif
+ make_dev(&dgm_cdevsw, (unit*65536)+i,
+ UID_ROOT, GID_WHEEL, 0600, "ttyM%d%x", unit, i + 0xa0);
+ make_dev(&dgm_cdevsw, (unit*65536)+i+64,
+ UID_ROOT, GID_WHEEL, 0600, "ttyiM%d%x", unit, i + 0xa0);
+ make_dev(&dgm_cdevsw, (unit*65536)+i+128,
+ UID_ROOT, GID_WHEEL, 0600, "ttylM%d%x", unit, i + 0xa0);
+ make_dev(&dgm_cdevsw, (unit*65536)+i+262144,
+ UID_UUCP, GID_DIALER, 0660, "cuaM%d%x", unit, i + 0xa0);
+ make_dev(&dgm_cdevsw, (unit*65536)+i+262208,
+ UID_UUCP, GID_DIALER, 0660, "cuaiM%d%x", unit, i + 0xa0);
+ make_dev(&dgm_cdevsw, (unit*65536)+i+262272,
+ UID_UUCP, GID_DIALER, 0660, "cualM%d%x", unit, i + 0xa0);
}
hidewin(sc);
diff --git a/sys/dev/dpt/dpt.h b/sys/dev/dpt/dpt.h
index af59b815e0e0..298f1326b819 100644
--- a/sys/dev/dpt/dpt.h
+++ b/sys/dev/dpt/dpt.h
@@ -40,21 +40,13 @@
*/
-#ident "$Id: dpt.h,v 1.3 1998/09/20 07:19:52 gibbs Exp $"
+#ident "$Id: dpt.h,v 1.4 1998/09/22 04:55:07 gibbs Exp $"
#ifndef _DPT_H
#define _DPT_H
#include <sys/ioccom.h>
-#ifdef DEVFS
-#include <sys/devfsext.h>
-#ifdef SLICE
-#include <sys/device.h>
-#include <dev/slice/slice.h>
-#endif /* SLICE */
-#endif
-
#define DPT_CDEV_MAJOR 88
#undef DPT_USE_DLM_SWI
diff --git a/sys/dev/dpt/dpt_pci.c b/sys/dev/dpt/dpt_pci.c
index 4e03f7830699..3828d08b6cb0 100644
--- a/sys/dev/dpt/dpt_pci.c
+++ b/sys/dev/dpt/dpt_pci.c
@@ -32,9 +32,8 @@
* dptpci.c: PCI Bus Attachment for DPT SCSI HBAs
*/
-#ident "$Id: dpt_pci.c,v 1.13 1999/05/09 17:06:44 peter Exp $"
+#ident "$Id: dpt_pci.c,v 1.14 1999/08/16 01:52:20 gibbs Exp $"
-#include "opt_devfs.h"
#include "opt_dpt.h"
#include <sys/param.h>
diff --git a/sys/dev/fb/fb.c b/sys/dev/fb/fb.c
index 2b1eeadeca9e..ba697cfbe193 100644
--- a/sys/dev/fb/fb.c
+++ b/sys/dev/fb/fb.c
@@ -25,7 +25,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: fb.c,v 1.6 1999/06/22 14:13:22 yokota Exp $
+ * $Id: fb.c,v 1.7 1999/07/04 14:58:15 phk Exp $
*/
#include "fb.h"
@@ -409,8 +409,6 @@ fb_attach(dev_t dev, video_adapter_t *adp, struct cdevsw *cdevsw)
vidcdevsw[adp->va_index] = cdevsw;
splx(s);
- /* XXX: DEVFS? */
-
printf("fb%d at %s%d\n", adp->va_index, adp->va_name, adp->va_unit);
return 0;
}
diff --git a/sys/dev/fdc/fdc.c b/sys/dev/fdc/fdc.c
index c86bc86c6adf..dc1a69999f2c 100644
--- a/sys/dev/fdc/fdc.c
+++ b/sys/dev/fdc/fdc.c
@@ -47,12 +47,11 @@
* SUCH DAMAGE.
*
* from: @(#)fd.c 7.4 (Berkeley) 5/25/91
- * $Id: fd.c,v 1.151 1999/07/29 11:27:33 joerg Exp $
+ * $Id: fd.c,v 1.152 1999/08/14 11:40:41 phk Exp $
*
*/
#include "fd.h"
-#include "opt_devfs.h"
#include "opt_fdc.h"
#if NFDC > 0
@@ -80,10 +79,6 @@
#include <machine/resource.h>
#include <machine/stdarg.h>
-#ifdef DEVFS
-#include <sys/devfsext.h>
-#endif /* DEVFS */
-
#include <isa/isavar.h>
#include <isa/isareg.h>
#include <isa/fdreg.h>
@@ -184,10 +179,6 @@ struct fd_data {
struct callout_handle toffhandle;
struct callout_handle tohandle;
struct devstat device_stats;
-#ifdef DEVFS
- void *bdevs[1 + NUMDENS + MAXPARTITIONS];
- void *cdevs[1 + NUMDENS + MAXPARTITIONS];
-#endif
device_t dev;
fdu_t fdu;
};
@@ -915,78 +906,9 @@ static int
fd_attach(device_t dev)
{
struct fd_data *fd;
-#ifdef DEVFS
- int i;
- int mynor;
- int typemynor;
- int typesize;
-#endif
fd = device_get_softc(dev);
-#ifdef DEVFS /* XXX bitrot */
- mynor = fd->fdu << 6;
- fd->bdevs[0] = devfs_add_devswf(&fd_cdevsw, mynor, DV_BLK,
- UID_ROOT, GID_OPERATOR, 0640,
- "fd%d", fd->fdu);
- fd->cdevs[0] = devfs_add_devswf(&fd_cdevsw, mynor, DV_CHR,
- UID_ROOT, GID_OPERATOR, 0640,
- "rfd%d", fd->fdu);
- for (i = 1; i < 1 + NUMDENS; i++) {
- /*
- * XXX this and the lookup in Fdopen() should be
- * data driven.
- */
- switch (fd->type) {
- case FD_360:
- if (i != FD_360)
- continue;
- break;
- case FD_720:
- if (i != FD_720 && i != FD_800 && i != FD_820)
- continue;
- break;
- case FD_1200:
- if (i != FD_360 && i != FD_720 && i != FD_800
- && i != FD_820 && i != FD_1200
- && i != FD_1440 && i != FD_1480)
- continue;
- break;
- case FD_1440:
- if (i != FD_720 && i != FD_800 && i != FD_820
- && i != FD_1200 && i != FD_1440
- && i != FD_1480 && i != FD_1720)
- continue;
- break;
- }
- typesize = fd_types[i - 1].size / 2;
- /*
- * XXX all these conversions give bloated code and
- * confusing names.
- */
- if (typesize == 1476)
- typesize = 1480;
- if (typesize == 1722)
- typesize = 1720;
- typemynor = mynor | i;
- fd->bdevs[i] =
- devfs_add_devswf(&fd_cdevsw, typemynor, DV_BLK,
- UID_ROOT, GID_OPERATOR, 0640,
- "fd%d.%d", fd->fdu, typesize);
- fd->cdevs[i] =
- devfs_add_devswf(&fd_cdevsw, typemynor, DV_CHR,
- UID_ROOT, GID_OPERATOR, 0640,
- "rfd%d.%d", fd->fdu, typesize);
- }
-
- for (i = 0; i < MAXPARTITIONS; i++) {
- fd->bdevs[1 + NUMDENS + i] = devfs_makelink(fd->bdevs[0],
- "fd%d%c", fd->fdu, 'a' + i);
- fd->cdevs[1 + NUMDENS + i] =
- devfs_makelink(fd->cdevs[0],
- "rfd%d%c", fd->fdu, 'a' + i);
- }
-#endif /* DEVFS */
/*
* Export the drive to the devstat interface.
*/
@@ -1010,11 +932,6 @@ static int yeattach(struct isa_device *dev)
fdu_t fdu;
fd_p fd;
int st0, st3, i;
-#ifdef DEVFS
- int mynor;
- int typemynor;
- int typesize;
-#endif
fdc->fdcu = fdcu;
/*
* the FDC_PCMCIA flag is used to to indicate special PIO is used
@@ -1090,41 +1007,6 @@ static int yeattach(struct isa_device *dev)
printf("fdc%d: 1.44MB 3.5in PCMCIA\n", fdcu);
fd->type = FD_1440;
-#ifdef DEVFS
- mynor = fdcu << 6;
- fd->bdevs[0] = devfs_add_devswf(&fd_cdevsw, mynor, DV_BLK,
- UID_ROOT, GID_OPERATOR, 0640,
- "fd%d", fdu);
- fd->cdevs[0] = devfs_add_devswf(&fd_cdevsw, mynor, DV_CHR,
- UID_ROOT, GID_OPERATOR, 0640,
- "rfd%d", fdu);
- /*
- * XXX this and the lookup in Fdopen() should be
- * data driven.
- */
- typemynor = mynor | FD_1440;
- typesize = fd_types[FD_1440 - 1].size / 2;
- /*
- * XXX all these conversions give bloated code and
- * confusing names.
- */
- if (typesize == 1476)
- typesize = 1480;
- if (typesize == 1722)
- typesize = 1720;
- fd->bdevs[FD_1440] = devfs_add_devswf(&fd_cdevsw, typemynor,
- DV_BLK, UID_ROOT, GID_OPERATOR,
- 0640, "fd%d.%d", fdu, typesize);
- fd->cdevs[FD_1440] = devfs_add_devswf(&fd_cdevsw, typemynor,
- DV_CHR, UID_ROOT, GID_OPERATOR,
- 0640,"rfd%d.%d", fdu, typesize);
- for (i = 0; i < MAXPARTITIONS; i++) {
- fd->bdevs[1 + NUMDENS + i] = devfs_makelink(fd->bdevs[0],
- "fd%d%c", fdu, 'a' + i);
- fd->cdevs[1 + NUMDENS + i] = devfs_makelink(fd->cdevs[0],
- "rfd%d%c", fdu, 'a' + i);
- }
-#endif /* DEVFS */
return (1);
}
#endif
diff --git a/sys/dev/joy/joy.c b/sys/dev/joy/joy.c
index a2edbd5f0690..56c90d1fc377 100644
--- a/sys/dev/joy/joy.c
+++ b/sys/dev/joy/joy.c
@@ -29,16 +29,10 @@
#include "joy.h"
#if NJOY > 0
-
-#include "opt_devfs.h"
-
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/conf.h>
#include <sys/kernel.h>
-#ifdef DEVFS
-#include <sys/devfsext.h>
-#endif /*DEVFS*/
#include <sys/uio.h>
#include <machine/clock.h>
@@ -75,9 +69,6 @@ static struct {
int port;
int x_off[2], y_off[2];
int timeout[2];
-#ifdef DEVFS
- void *devfs_token;
-#endif
} joy[NJOY];
@@ -141,11 +132,7 @@ joyattach (struct isa_device *dev)
joy[unit].port = dev->id_iobase;
joy[unit].timeout[0] = joy[unit].timeout[1] = 0;
printf("joy%d: joystick\n", unit);
-#ifdef DEVFS
- joy[dev->id_unit].devfs_token =
- devfs_add_devswf(&joy_cdevsw, 0, DV_CHR, 0, 0,
- 0600, "joy%d", unit);
-#endif
+ make_dev(&joy_cdevsw, 0, 0, 0, 0600, "joy%d", unit);
return 1;
}
diff --git a/sys/dev/kbd/atkbd.c b/sys/dev/kbd/atkbd.c
index 0d00ee6773e6..3786ee9a0b98 100644
--- a/sys/dev/kbd/atkbd.c
+++ b/sys/dev/kbd/atkbd.c
@@ -23,13 +23,12 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: atkbd.c,v 1.13 1999/08/15 06:06:14 yokota Exp $
+ * $Id: atkbd.c,v 1.14 1999/08/22 09:52:32 yokota Exp $
*/
#include "atkbd.h"
#include "opt_kbd.h"
#include "opt_atkbd.h"
-#include "opt_devfs.h"
#if NATKBD > 0
diff --git a/sys/dev/mcd/mcd.c b/sys/dev/mcd/mcd.c
index 17e9b0cc0107..0f5001715722 100644
--- a/sys/dev/mcd/mcd.c
+++ b/sys/dev/mcd/mcd.c
@@ -40,14 +40,12 @@
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: mcd.c,v 1.107 1999/05/30 16:52:19 phk Exp $
+ * $Id: mcd.c,v 1.108 1999/05/31 11:26:15 phk Exp $
*/
static const char COPYRIGHT[] = "mcd-driver (C)1993 by H.Veit & B.Moore";
#include "mcd.h"
#if NMCD > 0
-#include "opt_devfs.h"
-
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/conf.h>
@@ -57,9 +55,6 @@ static const char COPYRIGHT[] = "mcd-driver (C)1993 by H.Veit & B.Moore";
#include <sys/dkbad.h>
#include <sys/disklabel.h>
#include <sys/kernel.h>
-#ifdef DEVFS
-#include <sys/devfsext.h>
-#endif /*DEVFS*/
#include <machine/clock.h>
@@ -150,12 +145,6 @@ static struct mcd_data {
short debug;
struct buf_queue_head head; /* head of buf queue */
struct mcd_mbx mbx;
-#ifdef DEVFS
- void *ra_devfs_token; /* store the devfs handle here */
- void *rc_devfs_token; /* store the devfs handle here */
- void *a_devfs_token; /* store the devfs handle here */
- void *c_devfs_token; /* store the devfs handle here */
-#endif
} mcd_data[NMCD];
/* reader state machine */
@@ -275,24 +264,14 @@ int mcd_attach(struct isa_device *dev)
mcd_configure(cd);
#endif
/* name filled in probe */
-#ifdef DEVFS
- cd->ra_devfs_token =
- devfs_add_devswf(&mcd_cdevsw, dkmakeminor(unit, 0, 0),
- DV_CHR, UID_ROOT, GID_OPERATOR, 0640,
- "rmcd%da", unit);
- cd->rc_devfs_token =
- devfs_add_devswf(&mcd_cdevsw, dkmakeminor(unit, 0, RAW_PART),
- DV_CHR, UID_ROOT, GID_OPERATOR, 0640,
- "rmcd%dc", unit);
- cd->a_devfs_token =
- devfs_add_devswf(&mcd_cdevsw, dkmakeminor(unit, 0, 0),
- DV_BLK, UID_ROOT, GID_OPERATOR, 0640,
- "mcd%da", unit);
- cd->c_devfs_token =
- devfs_add_devswf(&mcd_cdevsw, dkmakeminor(unit, 0, RAW_PART),
- DV_BLK, UID_ROOT, GID_OPERATOR, 0640,
- "mcd%dc", unit);
-#endif
+ make_dev(&mcd_cdevsw, dkmakeminor(unit, 0, 0),
+ UID_ROOT, GID_OPERATOR, 0640, "rmcd%da", unit);
+ make_dev(&mcd_cdevsw, dkmakeminor(unit, 0, RAW_PART),
+ UID_ROOT, GID_OPERATOR, 0640, "rmcd%dc", unit);
+ make_dev(&mcd_cdevsw, dkmakeminor(unit, 0, 0),
+ UID_ROOT, GID_OPERATOR, 0640, "mcd%da", unit);
+ make_dev(&mcd_cdevsw, dkmakeminor(unit, 0, RAW_PART),
+ UID_ROOT, GID_OPERATOR, 0640, "mcd%dc", unit);
return 1;
}
diff --git a/sys/dev/mse/mse.c b/sys/dev/mse/mse.c
index a8676bc152a8..ddc41a8215f5 100644
--- a/sys/dev/mse/mse.c
+++ b/sys/dev/mse/mse.c
@@ -11,7 +11,7 @@
* this software for any purpose. It is provided "as is"
* without express or implied warranty.
*
- * $Id: mse.c,v 1.43 1999/05/30 16:52:20 phk Exp $
+ * $Id: mse.c,v 1.44 1999/05/31 11:26:17 phk Exp $
*/
/*
* Driver for the Logitech and ATI Inport Bus mice for use with 386bsd and
@@ -46,8 +46,6 @@
#include "mse.h"
#if NMSE > 0
-#include "opt_devfs.h"
-
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/conf.h>
@@ -55,9 +53,6 @@
#include <sys/poll.h>
#include <sys/select.h>
#include <sys/uio.h>
-#ifdef DEVFS
-#include <sys/devfsext.h>
-#endif /*DEVFS*/
#include <machine/clock.h>
#include <machine/mouse.h>
@@ -127,10 +122,6 @@ static struct mse_softc {
mousehw_t hw;
mousemode_t mode;
mousestatus_t status;
-#ifdef DEVFS
- void *devfs_token;
- void *n_devfs_token;
-#endif
} mse_sc[NMSE];
/* Flags */
@@ -281,14 +272,8 @@ mseattach(idp)
idp->id_ointr = mseintr;
sc->sc_port = idp->id_iobase;
sc->mode.accelfactor = (idp->id_flags & MSE_CONFIG_ACCEL) >> 4;
-#ifdef DEVFS
- sc->devfs_token =
- devfs_add_devswf(&mse_cdevsw, unit << 1, DV_CHR, 0, 0,
- 0600, "mse%d", unit);
- sc->n_devfs_token =
- devfs_add_devswf(&mse_cdevsw, (unit<<1)+1, DV_CHR,0, 0,
- 0600, "nmse%d", unit);
-#endif
+ make_dev(&mse_cdevsw, unit << 1, 0, 0, 0600, "mse%d", unit);
+ make_dev(&mse_cdevsw, (unit<<1)+1, 0, 0, 0600, "nmse%d", unit);
return (1);
}
diff --git a/sys/dev/pci/pci.c b/sys/dev/pci/pci.c
index 78b0cda459f5..75f41e87c72b 100644
--- a/sys/dev/pci/pci.c
+++ b/sys/dev/pci/pci.c
@@ -23,13 +23,12 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: pci.c,v 1.113 1999/07/28 07:57:47 dfr Exp $
+ * $Id: pci.c,v 1.114 1999/07/29 01:03:03 mdodd Exp $
*
*/
#include "opt_bus.h"
-#include "opt_devfs.h"
#include "opt_simos.h"
#include <sys/param.h>
@@ -42,9 +41,6 @@
#include <sys/queue.h>
#include <sys/types.h>
#include <sys/buf.h>
-#ifdef DEVFS
-#include <sys/devfsext.h>
-#endif /* DEVFS */
#include <vm/vm.h>
#include <vm/pmap.h>
@@ -916,22 +912,6 @@ static struct cdevsw pcicdev = {
/* bmaj */ -1
};
-#ifdef DEVFS
-static void *pci_devfs_token;
-#endif
-
-static void
-pci_cdevinit(void *dummy)
-{
- cdevsw_add(&pcicdev);
-#ifdef DEVFS
- pci_devfs_token = devfs_add_devswf(&pcicdev, 0, DV_CHR,
- UID_ROOT, GID_WHEEL, 0644, "pci");
-#endif
-}
-
-SYSINIT(pcidev, SI_SUB_DRIVERS, SI_ORDER_MIDDLE+PCI_CDEV, pci_cdevinit, NULL);
-
#include "pci_if.h"
/*
@@ -1109,9 +1089,14 @@ pci_add_children(device_t dev, int busno)
static int
pci_new_probe(device_t dev)
{
- device_set_desc(dev, "PCI bus");
+ static int once;
+ device_set_desc(dev, "PCI bus");
pci_add_children(dev, device_get_unit(dev));
+ if (!once) {
+ make_dev(&pcicdev, 0, UID_ROOT, GID_WHEEL, 0644, "pci");
+ once++;
+ }
return 0;
}
diff --git a/sys/dev/ppbus/lpt.c b/sys/dev/ppbus/lpt.c
index cfc8b13dd791..956c6a7c8d6f 100644
--- a/sys/dev/ppbus/lpt.c
+++ b/sys/dev/ppbus/lpt.c
@@ -48,7 +48,7 @@
* from: unknown origin, 386BSD 0.1
* From Id: lpt.c,v 1.55.2.1 1996/11/12 09:08:38 phk Exp
* From Id: nlpt.c,v 1.14 1999/02/08 13:55:43 des Exp
- * $Id: lpt.c,v 1.5 1999/05/31 11:24:56 phk Exp $
+ * $Id: lpt.c,v 1.6 1999/06/03 22:03:35 peter Exp $
*/
/*
@@ -63,7 +63,6 @@
#ifdef KERNEL
-#include "opt_devfs.h"
#include <sys/param.h>
#include <sys/systm.h>
@@ -72,9 +71,6 @@
#include <sys/kernel.h>
#include <sys/uio.h>
#include <sys/syslog.h>
-#ifdef DEVFS
-#include <sys/devfsext.h>
-#endif /*DEVFS*/
#include <sys/malloc.h>
#include <machine/clock.h>
@@ -136,10 +132,6 @@ struct lpt_data {
#define LP_ENABLE_EXT 0x10 /* we shall use advanced mode when possible */
u_char sc_backoff ; /* time to call lptout() again */
-#ifdef DEVFS
- void *devfs_token;
- void *devfs_token_ctl;
-#endif
};
static int nlpt = 0;
@@ -438,15 +430,10 @@ lptattach(struct ppb_device *dev)
lpt_release_ppbus(sc);
-#ifdef DEVFS
- sc->devfs_token = devfs_add_devswf(&lpt_cdevsw,
- dev->id_unit, DV_CHR,
- UID_ROOT, GID_WHEEL, 0600, LPT_NAME "%d", dev->id_unit);
- sc->devfs_token_ctl = devfs_add_devswf(&lpt_cdevsw,
- dev->id_unit | LP_BYPASS, DV_CHR,
- UID_ROOT, GID_WHEEL, 0600, LPT_NAME "%d.ctl", dev->id_unit);
-#endif
-
+ make_dev(&lpt_cdevsw, dev->id_unit,
+ UID_ROOT, GID_WHEEL, 0600, LPT_NAME "%d", dev->id_unit);
+ make_dev(&lpt_cdevsw, dev->id_unit | LP_BYPASS,
+ UID_ROOT, GID_WHEEL, 0600, LPT_NAME "%d.ctl", dev->id_unit);
return (1);
}
diff --git a/sys/dev/rc/rc.c b/sys/dev/rc/rc.c
index 78b94f201b22..78dd5f5a12cf 100644
--- a/sys/dev/rc/rc.c
+++ b/sys/dev/rc/rc.c
@@ -33,8 +33,6 @@
#include "rc.h"
#if NRC > 0
-#include "opt_devfs.h"
-
/*#define RCDEBUG*/
#include <sys/param.h>
@@ -46,10 +44,6 @@
#include <sys/fcntl.h>
#include <sys/interrupt.h>
#include <sys/kernel.h>
-#ifdef DEVFS
-#include <sys/devfsext.h>
-#endif /*DEVFS*/
-
#include <machine/clock.h>
#include <machine/ipl.h>
@@ -148,9 +142,6 @@ static struct rc_chans {
u_char *rc_obufend; /* end of output buf */
u_char rc_ibuf[4 * RC_IBUFSIZE]; /* input buffer */
u_char rc_obuf[RC_OBUFSIZE]; /* output buffer */
-#ifdef DEVFS
- void *devfs_token;
-#endif
} rc_chans[NRC * CD180_NCHAN];
static int rc_scheduled_event = 0;
@@ -274,14 +265,6 @@ rcattach(dvp)
tp->t_lflag = tp->t_iflag = tp->t_oflag = 0;
tp->t_cflag = TTYDEF_CFLAG;
tp->t_ispeed = tp->t_ospeed = TTYDEF_SPEED;
-#ifdef DEVFS
-/* FIX THIS to reflect real devices */
- rc->devfs_token =
- devfs_add_devswf(&rc_cdevsw,
- (dvp->id_unit * CD180_NCHAN) + chan,
- DV_CHR, 0, 0, 0600, "rc%d.%d",
- dvp->id_unit, chan);
-#endif
}
rcb->rcb_probed = RC_ATTACHED;
if (!rc_started) {
diff --git a/sys/dev/rp/rp.c b/sys/dev/rp/rp.c
index c1913a069353..b16f6e4f9131 100644
--- a/sys/dev/rp/rp.c
+++ b/sys/dev/rp/rp.c
@@ -29,7 +29,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: rp.c,v 1.27 1999/05/30 16:52:22 phk Exp $
+ * $Id: rp.c,v 1.28 1999/05/31 11:26:24 phk Exp $
*/
/*
@@ -1178,13 +1178,6 @@ rp_pciattach(pcici_t tag, int unit)
rp->rp_cts = (ChanStatus & CTS_ACT) != 0;
line = (unit << 5) | (aiop << 3) | chan;
rp_table(line) = rp;
-/* devfs_add_devswf(&rp_cdevsw,
- port, DV_CHR, UID_ROOT, GID_WHEEL, 0600,
- "ttyR%r", port);
- devfs_add_devswf(&rp_cdevsw,
- port | CONTROL_INIT_STATE, DV_CHR, UID_ROOT,
- GID_WHEEL, 0600, "ttyRi%r", port);
-*/
}
}
}
diff --git a/sys/dev/scd/scd.c b/sys/dev/scd/scd.c
index ff4832d96a55..a9e39f13fdc2 100644
--- a/sys/dev/scd/scd.c
+++ b/sys/dev/scd/scd.c
@@ -41,7 +41,7 @@
*/
-/* $Id: scd.c,v 1.46 1999/05/30 16:52:24 phk Exp $ */
+/* $Id: scd.c,v 1.47 1999/05/31 11:26:26 phk Exp $ */
/* Please send any comments to micke@dynas.se */
@@ -49,7 +49,6 @@
#include "scd.h"
#if NSCD > 0
-#include "opt_devfs.h"
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/conf.h>
@@ -58,9 +57,6 @@
#include <sys/dkbad.h>
#include <sys/disklabel.h>
#include <sys/kernel.h>
-#ifdef DEVFS
-#include <sys/devfsext.h>
-#endif /*DEVFS*/
#include <machine/clock.h>
#include <machine/stdarg.h>
@@ -136,12 +132,6 @@ static struct scd_data {
short audio_status;
struct buf_queue_head head; /* head of buf queue */
struct scd_mbx mbx;
-#ifdef DEVFS
- void *ra_devfs_token;
- void *rc_devfs_token;
- void *a_devfs_token;
- void *c_devfs_token;
-#endif
} scd_data[NSCD];
/* prototypes */
@@ -232,24 +222,14 @@ scd_attach(struct isa_device *dev)
cd->audio_status = CD_AS_AUDIO_INVALID;
bufq_init(&cd->head);
-#ifdef DEVFS
- cd->ra_devfs_token =
- devfs_add_devswf(&scd_cdevsw, dkmakeminor(unit, 0, 0),
- DV_CHR, UID_ROOT, GID_OPERATOR, 0640,
- "rscd%da", unit);
- cd->rc_devfs_token =
- devfs_add_devswf(&scd_cdevsw, dkmakeminor(unit, 0, RAW_PART),
- DV_CHR, UID_ROOT, GID_OPERATOR, 0640,
- "rscd%dc", unit);
- cd->a_devfs_token =
- devfs_add_devswf(&scd_cdevsw, dkmakeminor(unit, 0, 0),
- DV_BLK, UID_ROOT, GID_OPERATOR, 0640,
- "scd%da", unit);
- cd->c_devfs_token =
- devfs_add_devswf(&scd_cdevsw, dkmakeminor(unit, 0, RAW_PART),
- DV_BLK, UID_ROOT, GID_OPERATOR, 0640,
- "scd%dc", unit);
-#endif
+ make_dev(&scd_cdevsw, dkmakeminor(unit, 0, 0),
+ UID_ROOT, GID_OPERATOR, 0640, "rscd%da", unit);
+ make_dev(&scd_cdevsw, dkmakeminor(unit, 0, RAW_PART),
+ UID_ROOT, GID_OPERATOR, 0640, "rscd%dc", unit);
+ make_dev(&scd_cdevsw, dkmakeminor(unit, 0, 0),
+ UID_ROOT, GID_OPERATOR, 0640, "scd%da", unit);
+ make_dev(&scd_cdevsw, dkmakeminor(unit, 0, RAW_PART),
+ UID_ROOT, GID_OPERATOR, 0640, "scd%dc", unit);
return 1;
}
diff --git a/sys/dev/si/si.c b/sys/dev/si/si.c
index 5ec570acf795..c2f3b9836289 100644
--- a/sys/dev/si/si.c
+++ b/sys/dev/si/si.c
@@ -30,7 +30,7 @@
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
* NO EVENT SHALL THE AUTHORS BE LIABLE.
*
- * $Id: si.c,v 1.87 1999/05/31 11:26:28 phk Exp $
+ * $Id: si.c,v 1.88 1999/08/18 17:42:41 nsayer Exp $
*/
#ifndef lint
@@ -41,7 +41,6 @@ static const char si_copyright1[] = "@(#) Copyright (C) Specialix International
#include "opt_compat.h"
#include "opt_debug_si.h"
-#include "opt_devfs.h"
#include <sys/param.h>
#include <sys/systm.h>
@@ -56,9 +55,6 @@ static const char si_copyright1[] = "@(#) Copyright (C) Specialix International
#include <sys/kernel.h>
#include <sys/malloc.h>
#include <sys/sysctl.h>
-#ifdef DEVFS
-#include <sys/devfsext.h>
-#endif /*DEVFS*/
#include <machine/clock.h>
@@ -249,17 +245,6 @@ struct si_softc {
int sc_eisa_iobase; /* EISA io port address */
int sc_eisa_irq; /* EISA irq number */
#endif
-#ifdef DEVFS
- struct {
- void *ttya;
- void *cuaa;
- void *ttyl;
- void *cual;
- void *ttyi;
- void *cuai;
- } devfs_token[32]; /* what is the max per card? */
- void *control_token;
-#endif
};
static struct si_softc si_softc[NSI]; /* up to 4 elements */
@@ -1100,34 +1085,18 @@ try_next2:
done_chartimes = 1;
}
-#ifdef DEVFS
/* 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 + id->id_unit * (1 << SI_CARDSHIFT);
- sc->devfs_token[x].ttya = devfs_add_devswf(
- &si_cdevsw, x,
- DV_CHR, 0, 0, 0600, "ttyA%02d", y);
- sc->devfs_token[x].cuaa = devfs_add_devswf(
- &si_cdevsw, x + 0x00080,
- DV_CHR, 0, 0, 0600, "cuaA%02d", y);
- sc->devfs_token[x].ttyi = devfs_add_devswf(
- &si_cdevsw, x + 0x10000,
- DV_CHR, 0, 0, 0600, "ttyiA%02d", y);
- sc->devfs_token[x].cuai = devfs_add_devswf(
- &si_cdevsw, x + 0x10080,
- DV_CHR, 0, 0, 0600, "cuaiA%02d", y);
- sc->devfs_token[x].ttyl = devfs_add_devswf(
- &si_cdevsw, x + 0x20000,
- DV_CHR, 0, 0, 0600, "ttylA%02d", y);
- sc->devfs_token[x].cual = devfs_add_devswf(
- &si_cdevsw, x + 0x20080,
- DV_CHR, 0, 0, 0600, "cualA%02d", y);
+ make_dev( &si_cdevsw, x, 0, 0, 0600, "ttyA%02d", y);
+ make_dev( &si_cdevsw, x + 0x00080, 0, 0, 0600, "cuaA%02d", y);
+ make_dev( &si_cdevsw, x + 0x10000, 0, 0, 0600, "ttyiA%02d", y);
+ make_dev( &si_cdevsw, x + 0x10080, 0, 0, 0600, "cuaiA%02d", y);
+ make_dev( &si_cdevsw, x + 0x20000, 0, 0, 0600, "ttylA%02d", y);
+ make_dev( &si_cdevsw, x + 0x20080, 0, 0, 0600, "cualA%02d", y);
}
- sc->control_token =
- devfs_add_devswf(&si_cdevsw, 0x40000, DV_CHR, 0, 0, 0600,
- "si_control");
-#endif
+ make_dev(&si_cdevsw, 0x40000, 0, 0, 0600, "si_control");
return (1);
}
diff --git a/sys/dev/sio/sio.c b/sys/dev/sio/sio.c
index 815209b720f8..7a8c247fe2a8 100644
--- a/sys/dev/sio/sio.c
+++ b/sys/dev/sio/sio.c
@@ -30,7 +30,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: sio.c,v 1.254 1999/08/09 10:34:55 phk Exp $
+ * $Id: sio.c,v 1.255 1999/08/09 11:02:38 phk Exp $
* from: @(#)com.c 7.5 (Berkeley) 5/16/91
* from: i386/isa sio.c,v 1.234
*/
@@ -38,7 +38,6 @@
#include "opt_comconsole.h"
#include "opt_compat.h"
#include "opt_ddb.h"
-#include "opt_devfs.h"
#include "opt_sio.h"
#include "sio.h"
/* #include "pnp.h" */
@@ -70,9 +69,6 @@
#include <sys/bus.h>
#include <machine/bus.h>
#include <sys/rman.h>
-#ifdef DEVFS
-#include <sys/devfsext.h>
-#endif
#include <sys/timepps.h>
#include <isa/isareg.h>
@@ -298,14 +294,6 @@ struct com_s {
*/
u_char obuf1[256];
u_char obuf2[256];
-#ifdef DEVFS
- void *devfs_token_ttyd;
- void *devfs_token_ttyl;
- void *devfs_token_ttyi;
- void *devfs_token_cuaa;
- void *devfs_token_cual;
- void *devfs_token_cuai;
-#endif
};
#ifdef COM_ESP
@@ -1124,26 +1112,18 @@ determined_type: ;
register_swi(SWI_TTY, siopoll);
sio_registered = TRUE;
}
-#ifdef DEVFS
- com->devfs_token_ttyd = devfs_add_devswf(&sio_cdevsw,
- unit, DV_CHR,
- UID_ROOT, GID_WHEEL, 0600, "ttyd%r", unit);
- com->devfs_token_ttyi = devfs_add_devswf(&sio_cdevsw,
- unit | CONTROL_INIT_STATE, DV_CHR,
- UID_ROOT, GID_WHEEL, 0600, "ttyid%r", unit);
- com->devfs_token_ttyl = devfs_add_devswf(&sio_cdevsw,
- unit | CONTROL_LOCK_STATE, DV_CHR,
- UID_ROOT, GID_WHEEL, 0600, "ttyld%r", unit);
- com->devfs_token_cuaa = devfs_add_devswf(&sio_cdevsw,
- unit | CALLOUT_MASK, DV_CHR,
- UID_UUCP, GID_DIALER, 0660, "cuaa%r", unit);
- com->devfs_token_cuai = devfs_add_devswf(&sio_cdevsw,
- unit | CALLOUT_MASK | CONTROL_INIT_STATE, DV_CHR,
- UID_UUCP, GID_DIALER, 0660, "cuaia%r", unit);
- com->devfs_token_cual = devfs_add_devswf(&sio_cdevsw,
- unit | CALLOUT_MASK | CONTROL_LOCK_STATE, DV_CHR,
- UID_UUCP, GID_DIALER, 0660, "cuala%r", unit);
-#endif
+ make_dev(&sio_cdevsw, unit,
+ UID_ROOT, GID_WHEEL, 0600, "ttyd%r", unit);
+ make_dev(&sio_cdevsw, unit | CONTROL_INIT_STATE,
+ UID_ROOT, GID_WHEEL, 0600, "ttyid%r", unit);
+ make_dev(&sio_cdevsw, unit | CONTROL_LOCK_STATE,
+ UID_ROOT, GID_WHEEL, 0600, "ttyld%r", unit);
+ make_dev(&sio_cdevsw, unit | CALLOUT_MASK,
+ UID_UUCP, GID_DIALER, 0660, "cuaa%r", unit);
+ make_dev(&sio_cdevsw, unit | CALLOUT_MASK | CONTROL_INIT_STATE,
+ UID_UUCP, GID_DIALER, 0660, "cuaia%r", unit);
+ make_dev(&sio_cdevsw, unit | CALLOUT_MASK | CONTROL_LOCK_STATE,
+ UID_UUCP, GID_DIALER, 0660, "cuala%r", unit);
com->flags = isa_get_flags(dev); /* Heritate id_flags for later */
com->pps.ppscap = PPS_CAPTUREASSERT | PPS_CAPTURECLEAR;
pps_init(&com->pps);
diff --git a/sys/dev/snp/snp.c b/sys/dev/snp/snp.c
index 936ce9217165..0e7bf1afd7a8 100644
--- a/sys/dev/snp/snp.c
+++ b/sys/dev/snp/snp.c
@@ -12,7 +12,7 @@
*
* Snoop stuff.
*
- * $Id$
+ * $Id: tty_snoop.c,v 1.40 1999/06/17 23:42:44 gpalmer Exp $
*/
#include "snp.h"
@@ -20,8 +20,6 @@
#if NSNP > 0
#include "opt_compat.h"
-#include "opt_devfs.h"
-
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/filio.h>
@@ -34,9 +32,6 @@
#include <sys/conf.h>
#include <sys/poll.h>
#include <sys/kernel.h>
-#ifdef DEVFS
-#include <sys/devfsext.h>
-#endif /*DEVFS*/
#include <sys/snoop.h>
#include <sys/vnode.h>
@@ -521,31 +516,17 @@ snppoll(dev, events, p)
return (revents);
}
-#ifdef DEVFS
-static void *snp_devfs_token[NSNP];
-#endif
-static int snp_devsw_installed;
-
static void snp_drvinit __P((void *unused));
+
static void
snp_drvinit(unused)
void *unused;
{
-#ifdef DEVFS
int i;
-#endif
- if( ! snp_devsw_installed ) {
- cdevsw_add(&snp_cdevsw);
- snp_devsw_installed = 1;
-#ifdef DEVFS
- for ( i = 0 ; i < NSNP ; i++) {
- snp_devfs_token[i] =
- devfs_add_devswf(&snp_cdevsw, i, DV_CHR, 0, 0,
- 0600, "snp%d", i);
- }
-#endif
- }
+ cdevsw_add(&snp_cdevsw);
+ for ( i = 0 ; i < NSNP ; i++)
+ make_dev(&snp_cdevsw, i, 0, 0, 0600, "snp%d", i);
}
SYSINIT(snpdev,SI_SUB_DRIVERS,SI_ORDER_MIDDLE+CDEV_MAJOR,snp_drvinit,NULL)
diff --git a/sys/dev/speaker/spkr.c b/sys/dev/speaker/spkr.c
index b11251f4860a..29f82055c98a 100644
--- a/sys/dev/speaker/spkr.c
+++ b/sys/dev/speaker/spkr.c
@@ -4,15 +4,13 @@
* v1.4 by Eric S. Raymond (esr@snark.thyrsus.com) Aug 1993
* modified for FreeBSD by Andrew A. Chernov <ache@astral.msk.su>
*
- * $Id: spkr.c,v 1.38 1999/08/17 20:25:49 billf Exp $
+ * $Id: spkr.c,v 1.39 1999/08/23 20:35:17 bde Exp $
*/
#include "speaker.h"
#if NSPEAKER > 0
-#include "opt_devfs.h"
-
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/kernel.h>
@@ -24,11 +22,6 @@
#include <machine/clock.h>
#include <machine/speaker.h>
-#ifdef DEVFS
-#include <sys/devfsext.h>
-static void *devfs_token;
-#endif
-
static d_open_t spkropen;
static d_close_t spkrclose;
static d_write_t spkrwrite;
@@ -604,11 +597,7 @@ spkrioctl(dev, cmd, cmdarg, flags, p)
static void
spkr_drvinit(void *unused)
{
- cdevsw_add(&spkr_cdevsw);
-#ifdef DEVFS
- devfs_token = devfs_add_devswf(&spkr_cdevsw, 0, DV_CHR,
- UID_ROOT, GID_WHEEL, 0600, "speaker");
-#endif
+ make_dev(&spkr_cdevsw, 0, UID_ROOT, GID_WHEEL, 0600, "speaker");
}
SYSINIT(spkrdev,SI_SUB_DRIVERS,SI_ORDER_MIDDLE+CDEV_MAJOR,spkr_drvinit,NULL)
diff --git a/sys/dev/streams/streams.c b/sys/dev/streams/streams.c
index 07717d57e828..685d724fb5cd 100644
--- a/sys/dev/streams/streams.c
+++ b/sys/dev/streams/streams.c
@@ -30,11 +30,10 @@
* skeleton produced from /usr/share/examples/drivers/make_pseudo_driver.sh
* in 3.0-980524-SNAP then hacked a bit (but probably not enough :-).
*
- * $Id: streams.c,v 1.8 1999/08/01 12:51:06 newton Exp $
+ * $Id: streams.c,v 1.9 1999/08/04 18:53:37 green Exp $
*/
#include "streams.h" /* generated file.. defines NSTREAMS */
-#include "opt_devfs.h"
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/kernel.h> /* SYSINIT stuff */
@@ -53,9 +52,6 @@
#include <netinet/in.h>
#include <sys/proc.h>
#include <sys/uio.h>
-#ifdef DEVFS
-#include <sys/devfsext.h> /* DEVFS defintitions */
-#endif /* DEVFS */
#include <sys/sysproto.h>
@@ -129,22 +125,6 @@ static struct cdevsw streams_cdevsw = {
struct streams_softc {
struct isa_device *dev;
-#ifdef DEVFS
- /*
- * If this ever becomes an LKM we'll want this crud so we can deallocate
- * devfs entries when the module is unloaded
- */
- void *devfs_ptm;
- void *devfs_arp;
- void *devfs_icmp;
- void *devfs_ip;
- void *devfs_tcp;
- void *devfs_udp;
- void *devfs_rawip;
- void *devfs_unix_dgram;
- void *devfs_unix_stream;
- void *devfs_unix_ord_stream;
-#endif
} ;
#define UNIT(dev) minor(dev) /* assume one minor number per unit */
diff --git a/sys/dev/syscons/syscons.h b/sys/dev/syscons/syscons.h
index a65ba2c930c4..57f19a56b2e8 100644
--- a/sys/dev/syscons/syscons.h
+++ b/sys/dev/syscons/syscons.h
@@ -25,7 +25,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: syscons.h,v 1.50 1999/07/07 13:48:50 yokota Exp $
+ * $Id: syscons.h,v 1.51 1999/08/20 20:25:00 julian Exp $
*/
#ifndef _DEV_SYSCONS_SYSCONS_H_
@@ -207,11 +207,6 @@ typedef struct sc_softc {
struct scr_stat *old_scp;
int delayed_next_scr;
- /* uncontitional as you'd need to check opt_devfs in about 25 files */
- void *devfs_token[MAXCONS];
- void *mouse_devfs_token;
- void *console_devfs_token;
-
char font_loading_in_progress;
char switch_in_progress;
char videoio_in_progress;