summaryrefslogtreecommitdiffstats
path: root/sys/alpha/tlsb/zs_tlsb.c
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>1999-09-25 16:21:39 +0000
committerphk <phk@FreeBSD.org>1999-09-25 16:21:39 +0000
commita2c68c62dba7acc1de5dd6a6141484d9c12844fe (patch)
treec55829a482e5222c5ae63cf589d4fd2a7ec13aec /sys/alpha/tlsb/zs_tlsb.c
parent869afb6bbe2f0a063d91bf2099b7121d2d03c1b2 (diff)
downloadFreeBSD-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/alpha/tlsb/zs_tlsb.c')
-rw-r--r--sys/alpha/tlsb/zs_tlsb.c20
1 files changed, 6 insertions, 14 deletions
diff --git a/sys/alpha/tlsb/zs_tlsb.c b/sys/alpha/tlsb/zs_tlsb.c
index 37a9467..9e2d7dc 100644
--- a/sys/alpha/tlsb/zs_tlsb.c
+++ b/sys/alpha/tlsb/zs_tlsb.c
@@ -67,8 +67,6 @@ static d_close_t zsclose;
static d_read_t zsread;
static d_write_t zswrite;
static d_ioctl_t zsioctl;
-static d_stop_t zsstop;
-static d_devtotty_t zsdevtotty;
#define CDEV_MAJOR 98
static struct cdevsw zs_cdevsw = {
@@ -77,10 +75,10 @@ static struct cdevsw zs_cdevsw = {
/* read */ zsread,
/* write */ zswrite,
/* ioctl */ zsioctl,
- /* stop */ zsstop,
+ /* stop */ nostop,
/* reset */ noreset,
- /* devtotty */ zsdevtotty,
- /* poll */ ttpoll,
+ /* devtotty */ nodevtotty,
+ /* poll */ ttypoll,
/* mmap */ nommap,
/* strategy */ nostrategy,
/* name */ "zs",
@@ -95,6 +93,7 @@ static struct cdevsw zs_cdevsw = {
static void zsstart __P((struct tty *));
static int zsparam __P((struct tty *, struct termios *));
+static void zsstop __P((struct tty *tp, int flag));
/*
* Helpers for console support.
@@ -270,9 +269,11 @@ zsopen(dev_t dev, int flag, int mode, struct proc *p)
s = spltty();
tp = &sc->tty;
+ dev->si_tty = tp;
tp->t_oproc = zsstart;
tp->t_param = zsparam;
+ tp->t_stop = zsstop;
tp->t_dev = dev;
if ((tp->t_state & TS_ISOPEN) == 0) {
tp->t_state |= TS_CARR_ON;
@@ -381,15 +382,6 @@ zsstop(struct tty *tp, int flag)
splx(s);
}
-static struct tty *
-zsdevtotty(dev_t dev)
-{
- struct zs_softc* sc = ZS_SOFTC(minor(dev));
- if (!sc)
- return (NULL);
- return (&sc->tty);
-}
-
DEV_DRIVER_MODULE(zs, zsc, zs_driver, zs_devclass, zs_cdevsw, 0, 0);
/*
OpenPOWER on IntegriCloud