diff options
Diffstat (limited to 'sys/arch/i386/isa/pms.c')
-rw-r--r-- | sys/arch/i386/isa/pms.c | 29 |
1 files changed, 17 insertions, 12 deletions
diff --git a/sys/arch/i386/isa/pms.c b/sys/arch/i386/isa/pms.c index 12bb0e81548..e3ba04481b0 100644 --- a/sys/arch/i386/isa/pms.c +++ b/sys/arch/i386/isa/pms.c @@ -1,5 +1,5 @@ -/* $OpenBSD: pms.c,v 1.6 1996/04/18 17:12:20 niklas Exp $ */ -/* $NetBSD: pms.c,v 1.25 1996/03/16 06:08:50 thorpej Exp $ */ +/* $OpenBSD: pms.c,v 1.7 1996/04/21 22:17:02 deraadt Exp $ */ +/* $NetBSD: pms.c,v 1.27 1996/04/11 22:15:27 cgd Exp $ */ /*- * Copyright (c) 1994 Charles Hannum. @@ -105,8 +105,12 @@ int pmsprobe __P((struct device *, void *, void *)); void pmsattach __P((struct device *, struct device *, void *)); int pmsintr __P((void *)); -struct cfdriver pmscd = { - NULL, "pms", pmsprobe, pmsattach, DV_TTY, sizeof(struct pms_softc) +struct cfattach pms_ca = { + sizeof(struct pms_softc), pmsprobe, pmsattach, +}; + +struct cfdriver pms_cd = { + NULL, "pms", DV_TTY }; #define PMSUNIT(dev) (minor(dev)) @@ -200,14 +204,15 @@ pmsattach(parent, self, aux) { struct pms_softc *sc = (void *)self; int irq = self->dv_cfdata->cf_loc[0]; + isa_chipset_tag_t ic = aux; /* XXX */ printf(" irq %d\n", irq); /* Other initialization was done by pmsprobe. */ sc->sc_state = 0; - sc->sc_ih = isa_intr_establish(irq, IST_EDGE, IPL_TTY, pmsintr, - sc, sc->sc_dev.dv_xname); + sc->sc_ih = isa_intr_establish(ic, irq, IST_EDGE, IPL_TTY, + pmsintr, sc, sc->sc_dev.dv_xname); } int @@ -218,9 +223,9 @@ pmsopen(dev, flag) int unit = PMSUNIT(dev); struct pms_softc *sc; - if (unit >= pmscd.cd_ndevs) + if (unit >= pms_cd.cd_ndevs) return ENXIO; - sc = pmscd.cd_devs[unit]; + sc = pms_cd.cd_devs[unit]; if (!sc) return ENXIO; @@ -255,7 +260,7 @@ pmsclose(dev, flag) dev_t dev; int flag; { - struct pms_softc *sc = pmscd.cd_devs[PMSUNIT(dev)]; + struct pms_softc *sc = pms_cd.cd_devs[PMSUNIT(dev)]; /* Disable interrupts. */ pms_dev_cmd(PMS_DEV_DISABLE); @@ -275,7 +280,7 @@ pmsread(dev, uio, flag) struct uio *uio; int flag; { - struct pms_softc *sc = pmscd.cd_devs[PMSUNIT(dev)]; + struct pms_softc *sc = pms_cd.cd_devs[PMSUNIT(dev)]; int s; int error; size_t length; @@ -323,7 +328,7 @@ pmsioctl(dev, cmd, addr, flag) caddr_t addr; int flag; { - struct pms_softc *sc = pmscd.cd_devs[PMSUNIT(dev)]; + struct pms_softc *sc = pms_cd.cd_devs[PMSUNIT(dev)]; struct mouseinfo info; int s; int error; @@ -446,7 +451,7 @@ pmsselect(dev, rw, p) int rw; struct proc *p; { - struct pms_softc *sc = pmscd.cd_devs[PMSUNIT(dev)]; + struct pms_softc *sc = pms_cd.cd_devs[PMSUNIT(dev)]; int s; int ret; |