summaryrefslogtreecommitdiffstats
path: root/sys/i4b/driver/i4b_ctl.c
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>1999-06-01 08:46:56 +0000
committerphk <phk@FreeBSD.org>1999-06-01 08:46:56 +0000
commita65111acb3160be5e68432a6578b18275bdd4de8 (patch)
treea4c4d0067d80bac162a36ce07306fa156bc4dacb /sys/i4b/driver/i4b_ctl.c
parent4b1ce7da0de7c8d73b6062b28913a9383bf9adff (diff)
downloadFreeBSD-src-a65111acb3160be5e68432a6578b18275bdd4de8.zip
FreeBSD-src-a65111acb3160be5e68432a6578b18275bdd4de8.tar.gz
devsw and cdevsw_add() changes for i4b.
Reviewed by: hm
Diffstat (limited to 'sys/i4b/driver/i4b_ctl.c')
-rw-r--r--sys/i4b/driver/i4b_ctl.c39
1 files changed, 26 insertions, 13 deletions
diff --git a/sys/i4b/driver/i4b_ctl.c b/sys/i4b/driver/i4b_ctl.c
index 37a18a9..aac6f50 100644
--- a/sys/i4b/driver/i4b_ctl.c
+++ b/sys/i4b/driver/i4b_ctl.c
@@ -27,7 +27,7 @@
* i4b_ctl.c - i4b system control port driver
* ------------------------------------------
*
- * $Id: i4b_ctl.c,v 1.20 1999/04/26 10:16:54 hm Exp $
+ * $Id: i4b_ctl.c,v 1.4 1999/05/20 10:08:56 hm Exp $
*
* last edit-date: [Mon Apr 26 11:16:28 1999]
*
@@ -93,17 +93,33 @@ static d_ioctl_t i4bctlioctl;
#ifdef OS_USES_POLL
static d_poll_t i4bctlpoll;
+#define POLLFIELD i4bctlpoll
+#else
+#define POLLFIELD noselect
#endif
#define CDEV_MAJOR 55
-static struct cdevsw i4bctl_cdevsw =
- { i4bctlopen, i4bctlclose, noread, nowrite,
- i4bctlioctl, nostop, nullreset, nodevtotty,
-#ifdef OS_USES_POLL
- i4bctlpoll, nommap, NULL, "i4bctl", NULL, -1 };
-#else
- noselect, nommap, NULL, "i4bctl", NULL, -1 };
-#endif
+static struct cdevsw i4bctl_cdevsw = {
+ /* open */ i4bctlopen,
+ /* close */ i4bctlclose,
+ /* read */ noread,
+ /* write */ nowrite,
+ /* ioctl */ i4bctlioctl,
+ /* stop */ nostop,
+ /* reset */ noreset,
+ /* devtotty */ nodevtotty,
+ /* poll */ POLLFIELD,
+ /* mmap */ nommap,
+ /* strategy */ nostrategy,
+ /* name */ "i4bctl",
+ /* parms */ noparms,
+ /* maj */ CDEV_MAJOR,
+ /* dump */ nodump,
+ /* psize */ nopsize,
+ /* flags */ 0,
+ /* maxio */ 0,
+ /* bmaj */ -1
+};
static void i4bctlattach(void *);
PSEUDO_SET(i4bctlattach, i4b_i4bctldrv);
@@ -134,11 +150,8 @@ int i4bctlioctl __P((dev_t dev, int cmd, caddr_t data, int flag, struct proc *p)
static void
i4bctlinit(void *unused)
{
- dev_t dev;
- dev = makedev(CDEV_MAJOR, 0);
-
- cdevsw_add(&dev, &i4bctl_cdevsw, NULL);
+ cdevsw_add(&i4bctl_cdevsw);
}
SYSINIT(i4bctldev, SI_SUB_DRIVERS,SI_ORDER_MIDDLE+CDEV_MAJOR, &i4bctlinit, NULL);
OpenPOWER on IntegriCloud