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/dev/speaker | |
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/dev/speaker')
-rw-r--r-- | sys/dev/speaker/spkr.c | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/sys/dev/speaker/spkr.c b/sys/dev/speaker/spkr.c index b11251f..29f8205 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) |