summaryrefslogtreecommitdiffstats
path: root/sys/dev/rp
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/dev/rp
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/dev/rp')
-rw-r--r--sys/dev/rp/rp.c39
1 files changed, 6 insertions, 33 deletions
diff --git a/sys/dev/rp/rp.c b/sys/dev/rp/rp.c
index a3a4db2..d788b57 100644
--- a/sys/dev/rp/rp.c
+++ b/sys/dev/rp/rp.c
@@ -797,8 +797,6 @@ static d_close_t rpclose;
static d_read_t rpread;
static d_write_t rpwrite;
static d_ioctl_t rpioctl;
-static d_stop_t rpstop;
-static d_devtotty_t rpdevtotty;
#define CDEV_MAJOR 81
static struct cdevsw rp_cdevsw = {
@@ -807,10 +805,10 @@ static struct cdevsw rp_cdevsw = {
/* read */ rpread,
/* write */ rpwrite,
/* ioctl */ rpioctl,
- /* stop */ rpstop,
+ /* stop */ nostop,
/* reset */ noreset,
- /* devtotty */ rpdevtotty,
- /* poll */ ttpoll,
+ /* devtotty */ nodevtotty,
+ /* poll */ ttypoll,
/* mmap */ nommap,
/* strategy */ nostrategy,
/* name */ driver_name,
@@ -859,10 +857,9 @@ static struct rp_port *p_rp_table[MAX_RP_PORTS];
* The top-level routines begin here
*/
-int rpselect __P((dev_t, int, struct proc *));
-
static int rpparam __P((struct tty *, struct termios *));
static void rpstart __P((struct tty *));
+static void rpstop __P((struct tty *, int));
static void rphardclose __P((struct rp_port *));
#define rpmap nomap
#define rpreset noreset
@@ -1310,6 +1307,7 @@ rpopen(dev, flag, mode, p)
/* rp->rp_tty = &rp_tty[rp->rp_port];
*/
tp = rp->rp_tty;
+ dev->si_tty = tp;
oldspl = spltty();
@@ -1349,6 +1347,7 @@ open_top:
tp->t_dev = dev;
tp->t_param = rpparam;
tp->t_oproc = rpstart;
+ tp->t_stop = rpstop;
tp->t_line = 0;
tp->t_termios = IS_CALLOUT(dev) ? rp->it_out : rp->it_in;
flags = 0;
@@ -2017,29 +2016,3 @@ rpstop(tp, flag)
splx(spl);
rpstart(tp);
}
-
-int
-rpselect(dev, flag, p)
- dev_t dev;
- int flag;
- struct proc *p;
-{
- return(0);
-}
-
-struct tty *
-rpdevtotty(dev_t dev)
-{
- struct rp_port *rp;
- int unit, port, mynor, umynor; /* SG */
-
- umynor = (((minor(dev) >> 16) -1) * 32); /* SG */
- port = (minor(dev) & 0x1f); /* SG */
- mynor = (port + umynor); /* SG */
- unit = minor_to_unit[mynor]; /* SG */
-
- if(IS_CONTROL(dev))
- return(NULL);
- rp = rp_addr(unit) + port;
- return(rp->rp_tty);
-}
OpenPOWER on IntegriCloud