summaryrefslogtreecommitdiffstats
path: root/sys/dev/joy
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>1999-08-23 20:59:21 +0000
committerphk <phk@FreeBSD.org>1999-08-23 20:59:21 +0000
commit663cbe4fc26065f7af7d10faaee492a626156145 (patch)
tree32e619fadb473bfb85ff8e06044176f2ff323cce /sys/dev/joy
parent2a5ff1f726f814a9e4717afe3f14250f8030cace (diff)
downloadFreeBSD-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/joy')
-rw-r--r--sys/dev/joy/joy.c15
1 files changed, 1 insertions, 14 deletions
diff --git a/sys/dev/joy/joy.c b/sys/dev/joy/joy.c
index a2edbd5..56c90d1 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;
}
OpenPOWER on IntegriCloud