aboutsummaryrefslogtreecommitdiff
path: root/sys/gnu/i386
diff options
context:
space:
mode:
authorPoul-Henning Kamp <phk@FreeBSD.org>1999-05-08 07:02:41 +0000
committerPoul-Henning Kamp <phk@FreeBSD.org>1999-05-08 07:02:41 +0000
commit1637aa4b1cc600e66276de2f474a9a6d5cdb0ef7 (patch)
treeccd9f176822ca69c44d49f50176220c3f73d6feb /sys/gnu/i386
parentcb40a67f2b40b850bbb2b920ce52cf90cc9f9faf (diff)
downloadsrc-1637aa4b1cc600e66276de2f474a9a6d5cdb0ef7.tar.gz
src-1637aa4b1cc600e66276de2f474a9a6d5cdb0ef7.zip
Fix some of the places where too much inside knowledge about major/minor
layout and dev_t structure is being (ab)used.
Notes
Notes: svn path=/head/; revision=46679
Diffstat (limited to 'sys/gnu/i386')
-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 127dfe992783..e9a044bee226 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 e274ea70f7ec..291e520c4192 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;