summaryrefslogtreecommitdiffstats
path: root/sys/dev/ppbus/lpt.c
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/ppbus/lpt.c
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/ppbus/lpt.c')
-rw-r--r--sys/dev/ppbus/lpt.c23
1 files changed, 5 insertions, 18 deletions
diff --git a/sys/dev/ppbus/lpt.c b/sys/dev/ppbus/lpt.c
index cfc8b13..956c6a7 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);
}
OpenPOWER on IntegriCloud