summaryrefslogtreecommitdiffstats
path: root/sys/gnu
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>1999-05-08 07:02:41 +0000
committerphk <phk@FreeBSD.org>1999-05-08 07:02:41 +0000
commitbac74fbd5437e3b09bdcbbe1a58698e0fc6aab8b (patch)
tree64550e00285b8b98137f77e0130d6b4285790397 /sys/gnu
parent31167e1a820f19bcb6a06bf97cbead60ae7105d6 (diff)
downloadFreeBSD-src-bac74fbd5437e3b09bdcbbe1a58698e0fc6aab8b.zip
FreeBSD-src-bac74fbd5437e3b09bdcbbe1a58698e0fc6aab8b.tar.gz
Fix some of the places where too much inside knowledge about major/minor
layout and dev_t structure is being (ab)used.
Diffstat (limited to 'sys/gnu')
-rw-r--r--sys/gnu/i386/isa/dgb.c7
-rw-r--r--sys/gnu/i386/isa/dgm.c7
2 files changed, 6 insertions, 8 deletions
diff --git a/sys/gnu/i386/isa/dgb.c b/sys/gnu/i386/isa/dgb.c
index 127dfe9..e9a044b 100644
--- a/sys/gnu/i386/isa/dgb.c
+++ b/sys/gnu/i386/isa/dgb.c
@@ -1,5 +1,5 @@
/*-
- * dgb.c $Id: dgb.c,v 1.46 1999/04/28 10:51:55 dt Exp $
+ * dgb.c $Id: dgb.c,v 1.47 1999/05/02 21:39:52 peter Exp $
*
* Digiboard driver.
*
@@ -1953,9 +1953,8 @@ dgbparam(tp, t)
struct tty *tp;
struct termios *t;
{
- int dev=tp->t_dev;
- int unit=MINOR_TO_UNIT(dev);
- int pnum=MINOR_TO_PORT(dev);
+ int unit=MINOR_TO_UNIT(minor(tp->t_dev));
+ int pnum=MINOR_TO_PORT(minor(tp->t_dev));
struct dgb_softc *sc=&dgb_softc[unit];
struct dgb_p *port=&sc->ports[pnum];
volatile struct board_chan *bc=port->brdchan;
diff --git a/sys/gnu/i386/isa/dgm.c b/sys/gnu/i386/isa/dgm.c
index e274ea7..291e520 100644
--- a/sys/gnu/i386/isa/dgm.c
+++ b/sys/gnu/i386/isa/dgm.c
@@ -1,5 +1,5 @@
/*-
- * $Id: dgm.c,v 1.11 1999/05/02 21:39:52 peter Exp $
+ * $Id: dgm.c,v 1.12 1999/05/03 09:32:31 brian Exp $
*
* This driver and the associated header files support the ISA PC/Xem
* Digiboards. Its evolutionary roots are described below.
@@ -1757,9 +1757,8 @@ dgmparam(tp, t)
struct tty *tp;
struct termios *t;
{
- int dev=tp->t_dev;
- int unit=MINOR_TO_UNIT(dev);
- int pnum=MINOR_TO_PORT(dev);
+ int unit=MINOR_TO_UNIT(minor(tp->t_dev));
+ int pnum=MINOR_TO_PORT(minor(tp->t_dev));
struct dgm_softc *sc=&dgm_softc[unit];
struct dgm_p *port=&sc->ports[pnum];
volatile struct board_chan *bc=port->brdchan;
OpenPOWER on IntegriCloud