diff options
author | Poul-Henning Kamp <phk@FreeBSD.org> | 1999-09-25 16:21:39 +0000 |
---|---|---|
committer | Poul-Henning Kamp <phk@FreeBSD.org> | 1999-09-25 16:21:39 +0000 |
commit | ae8e1d08d7bf92c79a987fb2a6a4526fbb8415f6 (patch) | |
tree | e8ccb3ca13f44ca973f728258096d882547e3ad2 /sys/isa/sio.c | |
parent | 2baad6b54ce317c346edf8f37ff0eca38e677146 (diff) | |
download | src-ae8e1d08d7bf92c79a987fb2a6a4526fbb8415f6.tar.gz src-ae8e1d08d7bf92c79a987fb2a6a4526fbb8415f6.zip |
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
Notes
Notes:
svn path=/head/; revision=51654
Diffstat (limited to 'sys/isa/sio.c')
-rw-r--r-- | sys/isa/sio.c | 30 |
1 files changed, 7 insertions, 23 deletions
diff --git a/sys/isa/sio.c b/sys/isa/sio.c index 0e9dcad49ee7..28c54db19427 100644 --- a/sys/isa/sio.c +++ b/sys/isa/sio.c @@ -307,6 +307,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)); @@ -338,8 +339,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 = { @@ -348,10 +347,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, @@ -1210,6 +1209,7 @@ open_top: */ tp->t_oproc = comstart; tp->t_param = comparam; + tp->t_stop = comstop; tp->t_dev = dev; tp->t_termios = mynor & CALLOUT_MASK ? com->it_out : com->it_in; @@ -1336,7 +1336,7 @@ sioclose(dev, flag, mode, p) s = spltty(); (*linesw[tp->t_line].l_close)(tp, flag); disc_optim(tp, &tp->t_termios, com); - siostop(tp, FREAD | FWRITE); + comstop(tp, FREAD | FWRITE); comhardclose(com); ttyclose(tp); siosettimeout(); @@ -2375,7 +2375,7 @@ comstart(tp) } static void -siostop(tp, rw) +comstop(tp, rw) struct tty *tp; int rw; { @@ -2415,22 +2415,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; |