summaryrefslogtreecommitdiffstats
path: root/sys/dev/snp
diff options
context:
space:
mode:
authorscrappy <scrappy@FreeBSD.org>1996-03-28 14:31:42 +0000
committerscrappy <scrappy@FreeBSD.org>1996-03-28 14:31:42 +0000
commit85dc41d2a0bf4b66009df220e45b05172b70a077 (patch)
tree025b969f51a7a68ecbdccfd2bc8335f918bc4215 /sys/dev/snp
parent3bdc572dfd26a9811e5a652ddd4af48bd11f0e24 (diff)
downloadFreeBSD-src-85dc41d2a0bf4b66009df220e45b05172b70a077.zip
FreeBSD-src-85dc41d2a0bf4b66009df220e45b05172b70a077.tar.gz
Switched from using devfs_add_devsw() to devfs_add_devswf()
Reviewed by: julian@freebsd.org
Diffstat (limited to 'sys/dev/snp')
-rw-r--r--sys/dev/snp/snp.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/sys/dev/snp/snp.c b/sys/dev/snp/snp.c
index ed9ae26..c09ccd7 100644
--- a/sys/dev/snp/snp.c
+++ b/sys/dev/snp/snp.c
@@ -509,15 +509,18 @@ snpselect(dev, rw, p)
return 0;
}
+#ifdef DEVFS
static void *snp_devfs_token[NSNP];
+#endif
static snp_devsw_installed = 0;
static void
snp_drvinit(void *unused)
{
dev_t dev;
- char name[32];
+#ifdef DEVFS
int i;
+#endif
if( ! snp_devsw_installed ) {
dev = makedev(CDEV_MAJOR, 0);
@@ -525,10 +528,9 @@ snp_drvinit(void *unused)
snp_devsw_installed = 1;
#ifdef DEVFS
for ( i = 0 ; i < NSNP ; i++) {
- sprintf(name,"snp%d",i);
snp_devfs_token[i] =
- devfs_add_devsw( "/", name, &snp_cdevsw, i,
- DV_CHR, 0, 0, 0600);
+ devfs_add_devswf(&snp_cdevsw, i, DV_CHR, 0, 0,
+ 0600, "snp%d", i);
}
#endif
}
OpenPOWER on IntegriCloud