summaryrefslogtreecommitdiffstats
path: root/sys/i386/isa/stallion.c
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>1999-09-28 11:45:31 +0000
committerphk <phk@FreeBSD.org>1999-09-28 11:45:31 +0000
commit5e9f92ecf757c8f55ddae7d0dcec108fef05954d (patch)
tree98fbe8a4cc58070df6f9fb9ad41348c78b444f78 /sys/i386/isa/stallion.c
parent9f4fe5b99e561702e8ee5934290097d4ef487e94 (diff)
downloadFreeBSD-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/stallion.c')
-rw-r--r--sys/i386/isa/stallion.c40
1 files changed, 2 insertions, 38 deletions
diff --git a/sys/i386/isa/stallion.c b/sys/i386/isa/stallion.c
index 76e9119..4194878 100644
--- a/sys/i386/isa/stallion.c
+++ b/sys/i386/isa/stallion.c
@@ -438,8 +438,6 @@ static int stlattach(struct isa_device *idp);
STATIC d_open_t stlopen;
STATIC d_close_t stlclose;
-STATIC d_read_t stlread;
-STATIC d_write_t stlwrite;
STATIC d_ioctl_t stlioctl;
/*
@@ -532,8 +530,8 @@ COMPAT_PCI_DRIVER (stlpci, stlpcidriver);
static struct cdevsw stl_cdevsw = {
/* open */ stlopen,
/* close */ stlclose,
- /* read */ stlread,
- /* write */ stlwrite,
+ /* read */ ttyread,
+ /* write */ ttywrite,
/* ioctl */ stlioctl,
/* poll */ ttypoll,
/* mmap */ nommap,
@@ -898,23 +896,6 @@ STATIC int stlclose(dev_t dev, int flag, int mode, struct proc *p)
/*****************************************************************************/
-STATIC int stlread(dev_t dev, struct uio *uiop, int flag)
-{
- stlport_t *portp;
-
-#if DEBUG
- printf("stlread(dev=%s,uiop=%p,flag=%x)\n", devtoname(dev),
- (void *) uiop, flag);
-#endif
-
- portp = stl_dev2port(dev);
- if (portp == (stlport_t *) NULL)
- return(ENODEV);
- return((*linesw[portp->tty.t_line].l_read)(&portp->tty, uiop, flag));
-}
-
-/*****************************************************************************/
-
#if VFREEBSD >= 220
STATIC void stl_stop(struct tty *tp, int rw)
@@ -942,23 +923,6 @@ STATIC int stlstop(struct tty *tp, int rw)
/*****************************************************************************/
-STATIC int stlwrite(dev_t dev, struct uio *uiop, int flag)
-{
- stlport_t *portp;
-
-#if DEBUG
- printf("stlwrite(dev=%s,uiop=%p,flag=%x)\n", devtoname(dev),
- (void *) uiop, flag);
-#endif
-
- portp = stl_dev2port(dev);
- if (portp == (stlport_t *) NULL)
- return(ENODEV);
- return((*linesw[portp->tty.t_line].l_write)(&portp->tty, uiop, flag));
-}
-
-/*****************************************************************************/
-
STATIC int stlioctl(dev_t dev, unsigned long cmd, caddr_t data, int flag,
struct proc *p)
{
OpenPOWER on IntegriCloud