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/pc98/cbus | |
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/pc98/cbus')
-rw-r--r-- | sys/pc98/cbus/sio.c | 32 |
1 files changed, 8 insertions, 24 deletions
diff --git a/sys/pc98/cbus/sio.c b/sys/pc98/cbus/sio.c index 0aaa670..f34b034 100644 --- a/sys/pc98/cbus/sio.c +++ b/sys/pc98/cbus/sio.c @@ -253,7 +253,7 @@ * * The following com and tty flags correspond closely: * CS_BUSY = TS_BUSY (maintained by comstart(), siopoll() and - * siostop()) + * comstop()) * CS_TTGO = ~TS_TTSTOP (maintained by comparam() and comstart()) * CS_CTS_OFLOW = CCTS_OFLOW (maintained by comparam()) * CS_RTS_IFLOW = CRTS_IFLOW (maintained by comparam()) @@ -427,6 +427,7 @@ static int sioprobe __P((device_t dev)); static void siosettimeout __P((void)); static int siosetwater __P((struct com_s *com, speed_t speed)); static void comstart __P((struct tty *tp)); +static void comstop __P((struct tty *tp, int rw)); static timeout_t comwakeup; static void disc_optim __P((struct tty *tp, struct termios *t, struct com_s *com)); @@ -458,8 +459,6 @@ static d_close_t sioclose; static d_read_t sioread; static d_write_t siowrite; static d_ioctl_t sioioctl; -static d_stop_t siostop; -static d_devtotty_t siodevtotty; #define CDEV_MAJOR 28 static struct cdevsw sio_cdevsw = { @@ -468,10 +467,10 @@ static struct cdevsw sio_cdevsw = { /* read */ sioread, /* write */ siowrite, /* ioctl */ sioioctl, - /* stop */ siostop, + /* stop */ nostop, /* reset */ noreset, - /* devtotty */ siodevtotty, - /* poll */ ttpoll, + /* devtotty */ nodevtotty, + /* poll */ ttypoll, /* mmap */ nommap, /* strategy */ nostrategy, /* name */ driver_name, @@ -1946,6 +1945,7 @@ open_top: * callout, and to complete a callin open after DCD rises. */ tp->t_oproc = comstart; + tp->t_stop = comstop; tp->t_param = comparam; tp->t_dev = dev; tp->t_termios = mynor & CALLOUT_MASK @@ -2127,7 +2127,7 @@ sioclose(dev, flag, mode, p) com->modem_checking = 0; #endif disc_optim(tp, &tp->t_termios, com); - siostop(tp, FREAD | FWRITE); + comstop(tp, FREAD | FWRITE); comhardclose(com); ttyclose(tp); siosettimeout(); @@ -3612,7 +3612,7 @@ comstart(tp) } static void -siostop(tp, rw) +comstop(tp, rw) struct tty *tp; int rw; { @@ -3678,22 +3678,6 @@ siostop(tp, rw) comstart(tp); } -static struct tty * -siodevtotty(dev) - dev_t dev; -{ - int mynor; - int unit; - - mynor = minor(dev); - if (mynor & CONTROL_MASK) - return (NULL); - unit = MINOR_TO_UNIT(mynor); - if ((u_int) unit >= NSIOTOT) - return (NULL); - return (dev->si_tty); -} - static int commctl(com, bits, how) struct com_s *com; |