summaryrefslogtreecommitdiffstats
path: root/sys/kern/tty.c
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>1999-05-08 06:40:31 +0000
committerphk <phk@FreeBSD.org>1999-05-08 06:40:31 +0000
commit500e41bd7127ee03db75cd2a3704b8025c24e345 (patch)
tree8dc80d7dc8cd7f629dab45bcd87aa448cb9a4ca0 /sys/kern/tty.c
parented809a974db9e6d86dabb993b9b0c6c49e1bbf32 (diff)
downloadFreeBSD-src-500e41bd7127ee03db75cd2a3704b8025c24e345.zip
FreeBSD-src-500e41bd7127ee03db75cd2a3704b8025c24e345.tar.gz
I got tired of seeing all the cdevsw[major(foo)] all over the place.
Made a new (inline) function devsw(dev_t dev) and substituted it. Changed to the BDEV variant to this format as well: bdevsw(dev_t dev) DEVFS will eventually benefit from this change too.
Diffstat (limited to 'sys/kern/tty.c')
-rw-r--r--sys/kern/tty.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/kern/tty.c b/sys/kern/tty.c
index 4201196..8b946cf 100644
--- a/sys/kern/tty.c
+++ b/sys/kern/tty.c
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)tty.c 8.8 (Berkeley) 1/21/94
- * $Id: tty.c,v 1.116 1999/04/27 11:16:17 phk Exp $
+ * $Id: tty.c,v 1.117 1999/05/06 18:12:47 peter Exp $
*/
/*-
@@ -419,7 +419,7 @@ parmrk:
#ifdef sun4c /* XXX */
(*tp->t_stop)(tp, 0);
#else
- (*cdevsw[major(tp->t_dev)]->d_stop)(tp,
+ (*devsw(tp->t_dev)->d_stop)(tp,
0);
#endif
return (0);
@@ -996,7 +996,7 @@ ttioctl(tp, cmd, data, flag)
#ifdef sun4c /* XXX */
(*tp->t_stop)(tp, 0);
#else
- (*cdevsw[major(tp->t_dev)]->d_stop)(tp, 0);
+ (*devsw(tp->t_dev)->d_stop)(tp, 0);
#endif
}
splx(s);
@@ -1097,7 +1097,7 @@ ttpoll(dev, events, p)
int events;
struct proc *p;
{
- return ttypoll((*cdevsw[major(dev)]->d_devtotty)(dev), events, p);
+ return ttypoll((*devsw(dev)->d_devtotty)(dev), events, p);
}
/*
@@ -1189,7 +1189,7 @@ again:
#ifdef sun4c /* XXX */
(*tp->t_stop)(tp, rw);
#else
- (*cdevsw[major(tp->t_dev)]->d_stop)(tp, rw);
+ (*devsw(tp->t_dev)->d_stop)(tp, rw);
#endif
if (rw & FREAD) {
FLUSHQ(&tp->t_canq);
@@ -1374,7 +1374,7 @@ ttymodem(tp, flag)
#ifdef sun4c /* XXX */
(*tp->t_stop)(tp, 0);
#else
- (*cdevsw[major(tp->t_dev)]->d_stop)(tp, 0);
+ (*devsw(tp->t_dev)->d_stop)(tp, 0);
#endif
}
} else if (flag == 0) {
OpenPOWER on IntegriCloud