summaryrefslogtreecommitdiffstats
path: root/sys/dev/si
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/dev/si
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/dev/si')
-rw-r--r--sys/dev/si/si.c26
1 files changed, 1 insertions, 25 deletions
diff --git a/sys/dev/si/si.c b/sys/dev/si/si.c
index 79097ca..1de0aae 100644
--- a/sys/dev/si/si.c
+++ b/sys/dev/si/si.c
@@ -169,7 +169,6 @@ DATA_SET(eisadriver_set, si_eisa_driver);
static d_open_t siopen;
static d_close_t siclose;
-static d_read_t siread;
static d_write_t siwrite;
static d_ioctl_t siioctl;
@@ -177,7 +176,7 @@ static d_ioctl_t siioctl;
static struct cdevsw si_cdevsw = {
/* open */ siopen,
/* close */ siclose,
- /* read */ siread,
+ /* read */ ttyread,
/* write */ siwrite,
/* ioctl */ siioctl,
/* poll */ ttypoll,
@@ -1389,29 +1388,6 @@ sidtrwakeup(chan)
splx(oldspl);
}
-/*
- * User level stuff - read and write
- */
-static int
-siread(dev, uio, flag)
- register dev_t dev;
- struct uio *uio;
- int flag;
-{
- register struct tty *tp;
- int mynor = minor(dev);
-
- if (IS_SPECIAL(mynor)) {
- DPRINT((0, DBG_ENTRY|DBG_FAIL|DBG_READ, "siread(CONTROLDEV!!)\n"));
- return(ENODEV);
- }
- tp = MINOR2TP(mynor);
- DPRINT((TP2PP(tp), DBG_ENTRY|DBG_READ,
- "siread(%s,%x,%x)\n", devtoname(dev), uio, flag));
- return ((*linesw[tp->t_line].l_read)(tp, uio, flag));
-}
-
-
static int
siwrite(dev, uio, flag)
dev_t dev;
OpenPOWER on IntegriCloud