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/stallion.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/stallion.c')
-rw-r--r-- | sys/i386/isa/stallion.c | 30 |
1 files changed, 8 insertions, 22 deletions
diff --git a/sys/i386/isa/stallion.c b/sys/i386/isa/stallion.c index 628eb19b..99cef03 100644 --- a/sys/i386/isa/stallion.c +++ b/sys/i386/isa/stallion.c @@ -441,13 +441,6 @@ STATIC d_close_t stlclose; STATIC d_read_t stlread; STATIC d_write_t stlwrite; STATIC d_ioctl_t stlioctl; -STATIC d_stop_t stlstop; - -#if VFREEBSD >= 220 -STATIC d_devtotty_t stldevtotty; -#else -struct tty *stldevtotty(dev_t dev); -#endif /* * Internal function prototypes. @@ -458,6 +451,7 @@ static int stl_rawopen(stlport_t *portp); static int stl_rawclose(stlport_t *portp); static int stl_param(struct tty *tp, struct termios *tiosp); static void stl_start(struct tty *tp); +static void stl_stop(struct tty *tp, int); static void stl_ttyoptim(stlport_t *portp, struct termios *tiosp); static void stl_dotimeout(void); static void stl_poll(void *arg); @@ -541,10 +535,10 @@ static struct cdevsw stl_cdevsw = { /* read */ stlread, /* write */ stlwrite, /* ioctl */ stlioctl, - /* stop */ stlstop, + /* stop */ nostop, /* reset */ noreset, - /* devtotty */ stldevtotty, - /* poll */ ttpoll, + /* devtotty */ nodevtotty, + /* poll */ ttypoll, /* mmap */ nommap, /* strategy */ nostrategy, /* name */ "stl", @@ -783,6 +777,7 @@ STATIC int stlopen(dev_t dev, int flag, int mode, struct proc *p) if (portp == (stlport_t *) NULL) return(ENXIO); tp = &portp->tty; + dev->si_tty = tp; callout = minor(dev) & STL_CALLOUTDEV; error = 0; @@ -806,6 +801,7 @@ stlopen_restart: */ if ((tp->t_state & TS_ISOPEN) == 0) { tp->t_oproc = stl_start; + tp->t_stop = stl_stop; tp->t_param = stl_param; tp->t_dev = dev; tp->t_termios = callout ? portp->initouttios : @@ -926,10 +922,10 @@ STATIC int stlread(dev_t dev, struct uio *uiop, int flag) #if VFREEBSD >= 220 -STATIC void stlstop(struct tty *tp, int rw) +STATIC void stl_stop(struct tty *tp, int rw) { #if DEBUG - printf("stlstop(tp=%x,rw=%x)\n", (int) tp, rw); + printf("stl_stop(tp=%x,rw=%x)\n", (int) tp, rw); #endif stl_flush((stlport_t *) tp, rw); @@ -951,16 +947,6 @@ STATIC int stlstop(struct tty *tp, int rw) /*****************************************************************************/ -STATIC struct tty *stldevtotty(dev_t dev) -{ -#if DEBUG - printf("stldevtotty(dev=%s)\n", devtoname(dev)); -#endif - return((struct tty *) stl_dev2port(dev)); -} - -/*****************************************************************************/ - STATIC int stlwrite(dev_t dev, struct uio *uiop, int flag) { stlport_t *portp; |