diff options
author | phk <phk@FreeBSD.org> | 1999-08-23 20:59:21 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 1999-08-23 20:59:21 +0000 |
commit | 663cbe4fc26065f7af7d10faaee492a626156145 (patch) | |
tree | 32e619fadb473bfb85ff8e06044176f2ff323cce /sys/i386/isa/asc.c | |
parent | 2a5ff1f726f814a9e4717afe3f14250f8030cace (diff) | |
download | FreeBSD-src-663cbe4fc26065f7af7d10faaee492a626156145.zip FreeBSD-src-663cbe4fc26065f7af7d10faaee492a626156145.tar.gz |
Convert DEVFS hooks in (most) drivers to make_dev().
Diskslice/label code not yet handled.
Vinum, i4b, alpha, pc98 not dealt with (left to respective Maintainers)
Add the correct hook for devfs to kern_conf.c
The net result of this excercise is that a lot less files depends on DEVFS,
and devtoname() gets more sensible output in many cases.
A few drivers had minor additional cleanups performed relating to cdevsw
registration.
A few drivers don't register a cdevsw{} anymore, but only use make_dev().
Diffstat (limited to 'sys/i386/isa/asc.c')
-rw-r--r-- | sys/i386/isa/asc.c | 36 |
1 files changed, 8 insertions, 28 deletions
diff --git a/sys/i386/isa/asc.c b/sys/i386/isa/asc.c index 700271a..dce5783 100644 --- a/sys/i386/isa/asc.c +++ b/sys/i386/isa/asc.c @@ -34,7 +34,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /* - * $Id: asc.c,v 1.37 1999/05/30 16:52:07 phk Exp $ + * $Id: asc.c,v 1.38 1999/05/31 11:25:50 phk Exp $ */ #include "asc.h" @@ -48,12 +48,6 @@ #include <sys/kernel.h> #include <sys/poll.h> #include <sys/select.h> - -#include "opt_devfs.h" - -#ifdef DEVFS -#include <sys/devfsext.h> -#endif /*DEVFS*/ #include <sys/uio.h> #include <machine/asc_ioctl.h> @@ -162,12 +156,6 @@ struct asc_unit { struct selinfo selp; int height; /* height, for pnm modes */ size_t bcount; /* bytes to read, for pnm modes */ -#ifdef DEVFS - void *devfs_asc; /* storage for devfs tokens (handles) */ - void *devfs_ascp; - void *devfs_ascd; - void *devfs_ascpd; -#endif }; static struct asc_unit unittab[NASC]; @@ -497,23 +485,15 @@ ascattach(struct isa_device *isdp) scu->selp.si_flags=0; scu->selp.si_pid=(pid_t)0; -#ifdef DEVFS #define ASC_UID 0 #define ASC_GID 13 - scu->devfs_asc = - devfs_add_devswf(&asc_cdevsw, unit<<6, DV_CHR, ASC_UID, - ASC_GID, 0666, "asc%d", unit); - scu->devfs_ascp = - devfs_add_devswf(&asc_cdevsw, ((unit<<6) + FRMT_PBM), DV_CHR, - ASC_UID, ASC_GID, 0666, "asc%dp", unit); - scu->devfs_ascd = - devfs_add_devswf(&asc_cdevsw, ((unit<<6) + DBUG_MASK), DV_CHR, - ASC_UID, ASC_GID, 0666, "asc%dd", unit); - scu->devfs_ascpd = - devfs_add_devswf(&asc_cdevsw, ((unit<<6) + DBUG_MASK+FRMT_PBM), - DV_CHR, ASC_UID, ASC_GID, 0666, "asc%dpd", - unit); -#endif /*DEVFS*/ + make_dev(&asc_cdevsw, unit<<6, ASC_UID, ASC_GID, 0666, "asc%d", unit); + make_dev(&asc_cdevsw, ((unit<<6) + FRMT_PBM), + ASC_UID, ASC_GID, 0666, "asc%dp", unit); + make_dev(&asc_cdevsw, ((unit<<6) + DBUG_MASK), + ASC_UID, ASC_GID, 0666, "asc%dd", unit); + make_dev(&asc_cdevsw, ((unit<<6) + DBUG_MASK+FRMT_PBM), + ASC_UID, ASC_GID, 0666, "asc%dpd", unit); return ATTACH_SUCCESS; } |