diff options
Diffstat (limited to 'sys/i4b/driver')
-rw-r--r-- | sys/i4b/driver/i4b_ctl.c | 39 | ||||
-rw-r--r-- | sys/i4b/driver/i4b_rbch.c | 35 | ||||
-rw-r--r-- | sys/i4b/driver/i4b_tel.c | 35 | ||||
-rw-r--r-- | sys/i4b/driver/i4b_trace.c | 36 |
4 files changed, 96 insertions, 49 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); diff --git a/sys/i4b/driver/i4b_rbch.c b/sys/i4b/driver/i4b_rbch.c index 42a9f0c..e4a5e61 100644 --- a/sys/i4b/driver/i4b_rbch.c +++ b/sys/i4b/driver/i4b_rbch.c @@ -27,7 +27,7 @@ * i4b_rbch.c - device driver for raw B channel data * --------------------------------------------------- * - * $Id: i4b_rbch.c,v 1.31 1999/05/06 13:07:59 hm Exp $ + * $Id: i4b_rbch.c,v 1.3 1999/05/20 10:09:02 hm Exp $ * * last edit-date: [Thu May 6 13:40:22 1999] * @@ -168,19 +168,33 @@ PDEVSTATIC d_ioctl_t i4brbchioctl; #ifdef OS_USES_POLL PDEVSTATIC d_poll_t i4brbchpoll; +#define POLLFIELD i4brbchpoll #else PDEVSTATIC d_select_t i4brbchselect; +#define POLLFIELD i4brbchselect #endif #define CDEV_MAJOR 57 static struct cdevsw i4brbch_cdevsw = { - i4brbchopen, i4brbchclose, i4brbchread, i4brbchwrite, - i4brbchioctl, nostop, noreset, nodevtotty, -#ifdef OS_USES_POLL - i4brbchpoll, nommap, NULL, "i4brbch", NULL, -1 -#else - i4brbchselect, nommap, NULL, "i4brbch", NULL, -1 -#endif + /* open */ i4brbchopen, + /* close */ i4brbchclose, + /* read */ i4brbchread, + /* write */ i4brbchwrite, + /* ioctl */ i4brbchioctl, + /* stop */ nostop, + /* reset */ noreset, + /* devtotty */ nodevtotty, + /* poll */ POLLFIELD, + /* mmap */ nommap, + /* strategy */ nostrategy, + /* name */ "i4brbch", + /* parms */ noparms, + /* maj */ CDEV_MAJOR, + /* dump */ nodump, + /* psize */ nopsize, + /* flags */ 0, + /* maxio */ 0, + /* bmaj */ -1 }; static void i4brbchattach(void *); @@ -196,11 +210,8 @@ PSEUDO_SET(i4brbchattach, i4b_rbch); static void i4brbchinit(void *unused) { - dev_t dev; - - dev = makedev(CDEV_MAJOR, 0); - cdevsw_add(&dev, &i4brbch_cdevsw, NULL); + cdevsw_add(&i4brbch_cdevsw); } SYSINIT(i4brbchdev, SI_SUB_DRIVERS, diff --git a/sys/i4b/driver/i4b_tel.c b/sys/i4b/driver/i4b_tel.c index a548338..d681f3b 100644 --- a/sys/i4b/driver/i4b_tel.c +++ b/sys/i4b/driver/i4b_tel.c @@ -27,7 +27,7 @@ * i4b_tel.c - device driver for ISDN telephony * -------------------------------------------- * - * $Id: i4b_tel.c,v 1.40 1999/05/06 08:24:45 hm Exp $ + * $Id: i4b_tel.c,v 1.3 1999/05/20 10:09:03 hm Exp $ * * last edit-date: [Thu May 6 09:30:13 1999] * @@ -185,19 +185,33 @@ PDEVSTATIC d_read_t i4btelwrite; PDEVSTATIC d_ioctl_t i4btelioctl; #ifdef OS_USES_POLL PDEVSTATIC d_poll_t i4btelpoll; +#define POLLFIELD i4btelpoll #else PDEVSTATIC d_select_t i4btelsel; +#define POLLFIELD i4btelsel #endif #define CDEV_MAJOR 56 static struct cdevsw i4btel_cdevsw = { - i4btelopen, i4btelclose, i4btelread, i4btelwrite, - i4btelioctl, nostop, noreset, nodevtotty, -#ifdef OS_USES_POLL - i4btelpoll, nommap, NULL, "i4btel", NULL, -1 -#else - i4btelsel, nommap, NULL, "i4btel", NULL, -1 -#endif + /* open */ i4btelopen, + /* close */ i4btelclose, + /* read */ i4btelread, + /* write */ i4btelwrite, + /* ioctl */ i4btelioctl, + /* stop */ nostop, + /* reset */ noreset, + /* devtotty */ nodevtotty, + /* poll */ POLLFIELD, + /* mmap */ nommap, + /* strategy */ nostrategy, + /* name */ "i4btel", + /* parms */ noparms, + /* maj */ CDEV_MAJOR, + /* dump */ nodump, + /* psize */ nopsize, + /* flags */ 0, + /* maxio */ 0, + /* bmaj */ -1 }; PDEVSTATIC void i4btelinit(void *unused); @@ -215,11 +229,8 @@ PSEUDO_SET(i4btelattach, i4b_tel); PDEVSTATIC void i4btelinit(void *unused) { - dev_t dev; - dev = makedev(CDEV_MAJOR, 0); - - cdevsw_add(&dev, &i4btel_cdevsw, NULL); + cdevsw_add(&i4btel_cdevsw); } SYSINIT(i4bteldev, SI_SUB_DRIVERS, diff --git a/sys/i4b/driver/i4b_trace.c b/sys/i4b/driver/i4b_trace.c index fe94d14..b43ce24 100644 --- a/sys/i4b/driver/i4b_trace.c +++ b/sys/i4b/driver/i4b_trace.c @@ -27,7 +27,7 @@ * i4btrc - device driver for trace data read device * --------------------------------------------------- * - * $Id: i4b_trace.c,v 1.18 1999/04/28 08:23:21 hm Exp $ + * $Id: i4b_trace.c,v 1.3 1999/05/20 10:09:05 hm Exp $ * * last edit-date: [Wed Apr 28 10:21:09 1999] * @@ -127,17 +127,32 @@ static d_read_t i4btrcread; static d_ioctl_t i4btrcioctl; #ifdef OS_USES_POLL static d_poll_t i4btrcpoll; +#define POLLFIELD i4btrcpoll +#else +#define POLLFIELD noselect #endif #define CDEV_MAJOR 59 static struct cdevsw i4btrc_cdevsw = { - i4btrcopen, i4btrcclose, i4btrcread, nowrite, - i4btrcioctl, nostop, noreset, nodevtotty, -#ifdef OS_USES_POLL - i4btrcpoll, nommap, NULL, "i4btrc", NULL, -1 -#else - noselect, nommap, NULL, "i4btrc", NULL, -1 -#endif + /* open */ i4btrcopen, + /* close */ i4btrcclose, + /* read */ i4btrcread, + /* write */ nowrite, + /* ioctl */ i4btrcioctl, + /* stop */ nostop, + /* reset */ noreset, + /* devtotty */ nodevtotty, + /* poll */ POLLFIELD, + /* mmap */ nommap, + /* strategy */ nostrategy, + /* name */ "i4btrc", + /* parms */ noparms, + /* maj */ CDEV_MAJOR, + /* dump */ nodump, + /* psize */ nopsize, + /* flags */ 0, + /* maxio */ 0, + /* bmaj */ -1 }; /*---------------------------------------------------------------------------* @@ -146,11 +161,8 @@ static struct cdevsw i4btrc_cdevsw = { static void i4btrcinit(void *unused) { - dev_t dev; - - dev = makedev(CDEV_MAJOR, 0); - cdevsw_add(&dev, &i4btrc_cdevsw, NULL); + cdevsw_add(&i4btrc_cdevsw); } SYSINIT(i4btrcdev, SI_SUB_DRIVERS, |