From c4745fbe44eba07f727f23a86a4d7d9dc63c66be Mon Sep 17 00:00:00 2001 From: Per Fogelstrom Date: Wed, 1 May 1996 16:45:07 +0000 Subject: Updated to new config interface. --- sys/arch/pica/dev/com.c | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/sys/arch/pica/dev/com.c b/sys/arch/pica/dev/com.c index 729c56cb7d8..449e973ceef 100644 --- a/sys/arch/pica/dev/com.c +++ b/sys/arch/pica/dev/com.c @@ -101,8 +101,11 @@ void compoll __P((void *)); int comparam __P((struct tty *, struct termios *)); void comstart __P((struct tty *)); -struct cfdriver comcd = { - NULL, "com", commatch, comattach, DV_TTY, sizeof(struct com_softc) +struct cfattach com_ca = { + sizeof(struct com_softc), commatch, comattach +}; +struct cfdriver com_cd = { + NULL, "com", DV_TTY, NULL, 0 }; int comdefaultrate = TTYDEF_SPEED; @@ -270,9 +273,9 @@ comopen(dev, flag, mode, p) int s; int error = 0; - if (unit >= comcd.cd_ndevs) + if (unit >= com_cd.cd_ndevs) return ENXIO; - sc = comcd.cd_devs[unit]; + sc = com_cd.cd_devs[unit]; if (!sc) return ENXIO; @@ -365,7 +368,7 @@ comclose(dev, flag, mode, p) struct proc *p; { int unit = COMUNIT(dev); - struct com_softc *sc = comcd.cd_devs[unit]; + struct com_softc *sc = com_cd.cd_devs[unit]; struct tty *tp = sc->sc_tty; long iobase = sc->sc_iobase; int s; @@ -403,7 +406,7 @@ comread(dev, uio, flag) struct uio *uio; int flag; { - struct com_softc *sc = comcd.cd_devs[COMUNIT(dev)]; + struct com_softc *sc = com_cd.cd_devs[COMUNIT(dev)]; struct tty *tp = sc->sc_tty; return ((*linesw[tp->t_line].l_read)(tp, uio, flag)); @@ -415,7 +418,7 @@ comwrite(dev, uio, flag) struct uio *uio; int flag; { - struct com_softc *sc = comcd.cd_devs[COMUNIT(dev)]; + struct com_softc *sc = com_cd.cd_devs[COMUNIT(dev)]; struct tty *tp = sc->sc_tty; return ((*linesw[tp->t_line].l_write)(tp, uio, flag)); @@ -425,7 +428,7 @@ struct tty * comtty(dev) dev_t dev; { - struct com_softc *sc = comcd.cd_devs[COMUNIT(dev)]; + struct com_softc *sc = com_cd.cd_devs[COMUNIT(dev)]; struct tty *tp = sc->sc_tty; return (tp); @@ -453,7 +456,7 @@ comioctl(dev, cmd, data, flag, p) struct proc *p; { int unit = COMUNIT(dev); - struct com_softc *sc = comcd.cd_devs[unit]; + struct com_softc *sc = com_cd.cd_devs[unit]; struct tty *tp = sc->sc_tty; long iobase = sc->sc_iobase; int error; @@ -559,7 +562,7 @@ comparam(tp, t) struct tty *tp; struct termios *t; { - struct com_softc *sc = comcd.cd_devs[COMUNIT(tp->t_dev)]; + struct com_softc *sc = com_cd.cd_devs[COMUNIT(tp->t_dev)]; long iobase = sc->sc_iobase; int ospeed = comspeed(t->c_ospeed); u_char cfcr; @@ -655,7 +658,7 @@ void comstart(tp) struct tty *tp; { - struct com_softc *sc = comcd.cd_devs[COMUNIT(tp->t_dev)]; + struct com_softc *sc = com_cd.cd_devs[COMUNIT(tp->t_dev)]; long iobase = sc->sc_iobase; int s; @@ -751,8 +754,8 @@ compoll(arg) comevents = 0; splx(s); - for (unit = 0; unit < comcd.cd_ndevs; unit++) { - sc = comcd.cd_devs[unit]; + for (unit = 0; unit < com_cd.cd_ndevs; unit++) { + sc = com_cd.cd_devs[unit]; if (sc == 0 || sc->sc_ibufp == sc->sc_ibuf) continue; -- cgit v1.2.3