diff options
author | phk <phk@FreeBSD.org> | 1999-09-28 11:45:31 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 1999-09-28 11:45:31 +0000 |
commit | 5e9f92ecf757c8f55ddae7d0dcec108fef05954d (patch) | |
tree | 98fbe8a4cc58070df6f9fb9ad41348c78b444f78 /sys/i386/isa/istallion.c | |
parent | 9f4fe5b99e561702e8ee5934290097d4ef487e94 (diff) | |
download | FreeBSD-src-5e9f92ecf757c8f55ddae7d0dcec108fef05954d.zip FreeBSD-src-5e9f92ecf757c8f55ddae7d0dcec108fef05954d.tar.gz |
Introduce ttyread() and ttywrite() which do the canonical thing.
Use them in many tty drivers.
Reviewed by: julian, bde
Diffstat (limited to 'sys/i386/isa/istallion.c')
-rw-r--r-- | sys/i386/isa/istallion.c | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/sys/i386/isa/istallion.c b/sys/i386/isa/istallion.c index c0c7f9f..88d6149 100644 --- a/sys/i386/isa/istallion.c +++ b/sys/i386/isa/istallion.c @@ -1076,11 +1076,9 @@ STATIC int stliclose(dev_t dev, int flag, int mode, struct proc *p) return(0); } -/*****************************************************************************/ STATIC int stliread(dev_t dev, struct uio *uiop, int flag) { - stliport_t *portp; #if DEBUG printf("stliread(dev=%s,uiop=%p,flag=%x)\n", devtoname(dev), @@ -1089,11 +1087,8 @@ STATIC int stliread(dev_t dev, struct uio *uiop, int flag) if (minor(dev) & STL_MEMDEV) return(stli_memrw(dev, uiop, flag)); - - portp = stli_dev2port(dev); - if (portp == (stliport_t *) NULL) - return(ENODEV); - return((*linesw[portp->tty.t_line].l_read)(&portp->tty, uiop, flag)); + else + return(ttyread(dev, uiop, flag)); } /*****************************************************************************/ @@ -1136,11 +1131,8 @@ STATIC int stliwrite(dev_t dev, struct uio *uiop, int flag) if (minor(dev) & STL_MEMDEV) return(stli_memrw(dev, uiop, flag)); - - portp = stli_dev2port(dev); - if (portp == (stliport_t *) NULL) - return(ENODEV); - return((*linesw[portp->tty.t_line].l_write)(&portp->tty, uiop, flag)); + else + return(ttywrite(dev, uiop, flag)); } /*****************************************************************************/ |