aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/si/si.c
diff options
context:
space:
mode:
authorPoul-Henning Kamp <phk@FreeBSD.org>1999-08-23 20:59:21 +0000
committerPoul-Henning Kamp <phk@FreeBSD.org>1999-08-23 20:59:21 +0000
commit9dcbe2404a244059708f3bbc8cbfa0a14887c4ea (patch)
tree627cf9c78fb38268a3abc09deb78d86c316d87e6 /sys/dev/si/si.c
parentd9183205179005f7582d41a23d4588b0b1140298 (diff)
downloadsrc-9dcbe2404a244059708f3bbc8cbfa0a14887c4ea.tar.gz
src-9dcbe2404a244059708f3bbc8cbfa0a14887c4ea.zip
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().
Notes
Notes: svn path=/head/; revision=50254
Diffstat (limited to 'sys/dev/si/si.c')
-rw-r--r--sys/dev/si/si.c49
1 files changed, 9 insertions, 40 deletions
diff --git a/sys/dev/si/si.c b/sys/dev/si/si.c
index 5ec570acf795..c2f3b9836289 100644
--- a/sys/dev/si/si.c
+++ b/sys/dev/si/si.c
@@ -30,7 +30,7 @@
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
* NO EVENT SHALL THE AUTHORS BE LIABLE.
*
- * $Id: si.c,v 1.87 1999/05/31 11:26:28 phk Exp $
+ * $Id: si.c,v 1.88 1999/08/18 17:42:41 nsayer Exp $
*/
#ifndef lint
@@ -41,7 +41,6 @@ static const char si_copyright1[] = "@(#) Copyright (C) Specialix International
#include "opt_compat.h"
#include "opt_debug_si.h"
-#include "opt_devfs.h"
#include <sys/param.h>
#include <sys/systm.h>
@@ -56,9 +55,6 @@ static const char si_copyright1[] = "@(#) Copyright (C) Specialix International
#include <sys/kernel.h>
#include <sys/malloc.h>
#include <sys/sysctl.h>
-#ifdef DEVFS
-#include <sys/devfsext.h>
-#endif /*DEVFS*/
#include <machine/clock.h>
@@ -249,17 +245,6 @@ struct si_softc {
int sc_eisa_iobase; /* EISA io port address */
int sc_eisa_irq; /* EISA irq number */
#endif
-#ifdef DEVFS
- struct {
- void *ttya;
- void *cuaa;
- void *ttyl;
- void *cual;
- void *ttyi;
- void *cuai;
- } devfs_token[32]; /* what is the max per card? */
- void *control_token;
-#endif
};
static struct si_softc si_softc[NSI]; /* up to 4 elements */
@@ -1100,34 +1085,18 @@ try_next2:
done_chartimes = 1;
}
-#ifdef DEVFS
/* path name devsw minor type uid gid perm*/
for ( x = 0; x < sc->sc_nport; x++ ) {
/* sync with the manuals that start at 1 */
y = x + 1 + id->id_unit * (1 << SI_CARDSHIFT);
- sc->devfs_token[x].ttya = devfs_add_devswf(
- &si_cdevsw, x,
- DV_CHR, 0, 0, 0600, "ttyA%02d", y);
- sc->devfs_token[x].cuaa = devfs_add_devswf(
- &si_cdevsw, x + 0x00080,
- DV_CHR, 0, 0, 0600, "cuaA%02d", y);
- sc->devfs_token[x].ttyi = devfs_add_devswf(
- &si_cdevsw, x + 0x10000,
- DV_CHR, 0, 0, 0600, "ttyiA%02d", y);
- sc->devfs_token[x].cuai = devfs_add_devswf(
- &si_cdevsw, x + 0x10080,
- DV_CHR, 0, 0, 0600, "cuaiA%02d", y);
- sc->devfs_token[x].ttyl = devfs_add_devswf(
- &si_cdevsw, x + 0x20000,
- DV_CHR, 0, 0, 0600, "ttylA%02d", y);
- sc->devfs_token[x].cual = devfs_add_devswf(
- &si_cdevsw, x + 0x20080,
- DV_CHR, 0, 0, 0600, "cualA%02d", y);
- }
- sc->control_token =
- devfs_add_devswf(&si_cdevsw, 0x40000, DV_CHR, 0, 0, 0600,
- "si_control");
-#endif
+ make_dev( &si_cdevsw, x, 0, 0, 0600, "ttyA%02d", y);
+ make_dev( &si_cdevsw, x + 0x00080, 0, 0, 0600, "cuaA%02d", y);
+ make_dev( &si_cdevsw, x + 0x10000, 0, 0, 0600, "ttyiA%02d", y);
+ make_dev( &si_cdevsw, x + 0x10080, 0, 0, 0600, "cuaiA%02d", y);
+ make_dev( &si_cdevsw, x + 0x20000, 0, 0, 0600, "ttylA%02d", y);
+ make_dev( &si_cdevsw, x + 0x20080, 0, 0, 0600, "cualA%02d", y);
+ }
+ make_dev(&si_cdevsw, 0x40000, 0, 0, 0600, "si_control");
return (1);
}