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/kern/tty_tty.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/kern/tty_tty.c')
-rw-r--r-- | sys/kern/tty_tty.c | 22 |
1 files changed, 2 insertions, 20 deletions
diff --git a/sys/kern/tty_tty.c b/sys/kern/tty_tty.c index fd88fcd..1109c07 100644 --- a/sys/kern/tty_tty.c +++ b/sys/kern/tty_tty.c @@ -31,15 +31,13 @@ * SUCH DAMAGE. * * @(#)tty_tty.c 8.2 (Berkeley) 9/23/93 - * $Id: tty_tty.c,v 1.26 1999/05/30 16:53:00 phk Exp $ + * $Id: tty_tty.c,v 1.27 1999/05/31 11:27:41 phk Exp $ */ /* * Indirect driver for controlling tty. */ -#include "opt_devfs.h" - #include <sys/param.h> #include <sys/systm.h> #include <sys/conf.h> @@ -48,9 +46,6 @@ #include <sys/ttycom.h> #include <sys/vnode.h> #include <sys/kernel.h> -#ifdef DEVFS -#include <sys/devfsext.h> -#endif /*DEVFS*/ static d_open_t cttyopen; static d_read_t cttyread; @@ -193,26 +188,13 @@ cttypoll(dev, events, p) return (VOP_POLL(ttyvp, events, p->p_ucred, p)); } -static int ctty_devsw_installed; -#ifdef DEVFS -static void *ctty_devfs_token; -#endif - static void ctty_drvinit __P((void *unused)); static void ctty_drvinit(unused) void *unused; { - if( ! ctty_devsw_installed ) { - cdevsw_add(&ctty_cdevsw); - ctty_devsw_installed = 1; -#ifdef DEVFS - ctty_devfs_token = - devfs_add_devswf(&ctty_cdevsw, 0, DV_CHR, 0, 0, - 0666, "tty"); -#endif - } + make_dev(&ctty_cdevsw, 0, 0, 0, 0666, "tty"); } SYSINIT(cttydev,SI_SUB_DRIVERS,SI_ORDER_MIDDLE+CDEV_MAJOR,ctty_drvinit,NULL) |