From bac74fbd5437e3b09bdcbbe1a58698e0fc6aab8b Mon Sep 17 00:00:00 2001 From: phk Date: Sat, 8 May 1999 07:02:41 +0000 Subject: Fix some of the places where too much inside knowledge about major/minor layout and dev_t structure is being (ab)used. --- sys/gnu/i386/isa/dgb.c | 7 +++---- sys/gnu/i386/isa/dgm.c | 7 +++---- 2 files changed, 6 insertions(+), 8 deletions(-) (limited to 'sys/gnu') 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; -- cgit v1.1