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/dev/rc | |
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/dev/rc')
-rw-r--r-- | sys/dev/rc/rc.c | 30 |
1 files changed, 2 insertions, 28 deletions
diff --git a/sys/dev/rc/rc.c b/sys/dev/rc/rc.c index 91b735e..f437eec 100644 --- a/sys/dev/rc/rc.c +++ b/sys/dev/rc/rc.c @@ -87,16 +87,14 @@ struct isa_driver rcdriver = { static d_open_t rcopen; static d_close_t rcclose; -static d_read_t rcread; -static d_write_t rcwrite; static d_ioctl_t rcioctl; #define CDEV_MAJOR 63 static struct cdevsw rc_cdevsw = { /* open */ rcopen, /* close */ rcclose, - /* read */ rcread, - /* write */ rcwrite, + /* read */ ttyread, + /* write */ ttywrite, /* ioctl */ rcioctl, /* poll */ ttypoll, /* mmap */ nommap, @@ -865,30 +863,6 @@ register struct rc_chans *rc; (void) splx(s); } -/* Read from line */ -static int -rcread(dev, uio, flag) - dev_t dev; - struct uio *uio; - int flag; -{ - struct tty *tp = rc_chans[GET_UNIT(dev)].rc_tp; - - return ((*linesw[tp->t_line].l_read)(tp, uio, flag)); -} - -/* Write to line */ -static int -rcwrite(dev, uio, flag) - dev_t dev; - struct uio *uio; - int flag; -{ - struct tty *tp = rc_chans[GET_UNIT(dev)].rc_tp; - - return ((*linesw[tp->t_line].l_write)(tp, uio, flag)); -} - /* Reset the bastard */ static void rc_hwreset(unit, nec, chipid) register int unit, nec; |