diff options
author | phk <phk@FreeBSD.org> | 1999-09-25 16:21:39 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 1999-09-25 16:21:39 +0000 |
commit | a2c68c62dba7acc1de5dd6a6141484d9c12844fe (patch) | |
tree | c55829a482e5222c5ae63cf589d4fd2a7ec13aec /sys/i386/isa/istallion.c | |
parent | 869afb6bbe2f0a063d91bf2099b7121d2d03c1b2 (diff) | |
download | FreeBSD-src-a2c68c62dba7acc1de5dd6a6141484d9c12844fe.zip FreeBSD-src-a2c68c62dba7acc1de5dd6a6141484d9c12844fe.tar.gz |
This patch clears the way for removing a number of tty related
fields in struct cdevsw:
d_stop moved to struct tty.
d_reset already unused.
d_devtotty linkage now provided by dev_t->si_tty.
These fields will be removed from struct cdevsw together with
d_params and d_maxio Real Soon Now.
The changes in this patch consist of:
initialize dev->si_tty in *_open()
initialize tty->t_stop
remove devtotty functions
rename ttpoll to ttypoll
a few adjustments to these changes in the generic code
a bump of __FreeBSD_version
add a couple of FreeBSD tags
Diffstat (limited to 'sys/i386/isa/istallion.c')
-rw-r--r-- | sys/i386/isa/istallion.c | 30 |
1 files changed, 8 insertions, 22 deletions
diff --git a/sys/i386/isa/istallion.c b/sys/i386/isa/istallion.c index 597f927..9ca2275 100644 --- a/sys/i386/isa/istallion.c +++ b/sys/i386/isa/istallion.c @@ -528,13 +528,6 @@ STATIC d_close_t stliclose; STATIC d_read_t stliread; STATIC d_write_t stliwrite; STATIC d_ioctl_t stliioctl; -STATIC d_stop_t stlistop; - -#if VFREEBSD >= 220 -STATIC d_devtotty_t stlidevtotty; -#else -struct tty *stlidevtotty(dev_t dev); -#endif /* * Internal function prototypes. @@ -559,6 +552,7 @@ static long stli_mktiocm(unsigned long sigvalue); static void stli_rxprocess(stlibrd_t *brdp, stliport_t *portp); static void stli_flush(stliport_t *portp, int flag); static void stli_start(struct tty *tp); +static void stli_stop(struct tty *tp, int rw); static int stli_param(struct tty *tp, struct termios *tiosp); static void stli_ttyoptim(stliport_t *portp, struct termios *tiosp); static void stli_dtrwakeup(void *arg); @@ -646,10 +640,10 @@ static struct cdevsw stli_cdevsw = { /* read */ stliread, /* write */ stliwrite, /* ioctl */ stliioctl, - /* stop */ stlistop, + /* stop */ nostop, /* reset */ noreset, - /* devtotty */ stlidevtotty, - /* poll */ ttpoll, + /* devtotty */ nodevtotty, + /* poll */ ttypoll, /* mmap */ nommap, /* strategy */ nostrategy, /* name */ stli_drvname, @@ -951,6 +945,7 @@ STATIC int stliopen(dev_t dev, int flag, int mode, struct proc *p) if (portp == (stliport_t *) NULL) return(ENXIO); tp = &portp->tty; + dev->si_tty = tp; callout = minor(dev) & STL_CALLOUTDEV; error = 0; @@ -986,6 +981,7 @@ stliopen_restart: if ((tp->t_state & TS_ISOPEN) == 0) { tp->t_oproc = stli_start; tp->t_param = stli_param; + tp->t_stop = stli_stop; tp->t_dev = dev; tp->t_termios = callout ? portp->initouttios : portp->initintios; @@ -1109,10 +1105,10 @@ STATIC int stliread(dev_t dev, struct uio *uiop, int flag) #if VFREEBSD >= 220 -STATIC void stlistop(struct tty *tp, int rw) +STATIC void stli_stop(struct tty *tp, int rw) { #if DEBUG - printf("stlistop(tp=%x,rw=%x)\n", (int) tp, rw); + printf("stli_stop(tp=%x,rw=%x)\n", (int) tp, rw); #endif stli_flush((stliport_t *) tp, rw); @@ -1134,16 +1130,6 @@ STATIC int stlistop(struct tty *tp, int rw) /*****************************************************************************/ -STATIC struct tty *stlidevtotty(dev_t dev) -{ -#if DEBUG - printf("stlidevtotty(dev=%s)\n", devtoname(dev)); -#endif - return((struct tty *) stli_dev2port(dev)); -} - -/*****************************************************************************/ - STATIC int stliwrite(dev_t dev, struct uio *uiop, int flag) { stliport_t *portp; |