summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>2002-05-29 14:30:22 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>2002-05-29 14:30:22 +0000
commit861f79da55d01dd792fed4274d6c50c14ea21fb9 (patch)
tree2c87ddde27de76772fe65bdca5093bb2f2a33367 /sys/dev
parent74e21177f8ebd9256f2b51ed27b5b8a6d46d20df (diff)
there is no need to store ioaddr/iosize into the softc
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/pci/fms.c13
-rw-r--r--sys/dev/pci/fmsvar.h4
2 files changed, 8 insertions, 9 deletions
diff --git a/sys/dev/pci/fms.c b/sys/dev/pci/fms.c
index ece2c4e5ef4..cabbd8dac44 100644
--- a/sys/dev/pci/fms.c
+++ b/sys/dev/pci/fms.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fms.c,v 1.11 2002/05/29 14:23:30 mickey Exp $ */
+/* $OpenBSD: fms.c,v 1.12 2002/05/29 14:30:21 mickey Exp $ */
/* $NetBSD: fms.c,v 1.5.4.1 2000/06/30 16:27:50 simonb Exp $ */
/*-
@@ -186,12 +186,13 @@ fms_attach(parent, self, aux)
pci_chipset_tag_t pc = pa->pa_pc;
pcitag_t pt = pa->pa_tag;
pci_intr_handle_t ih;
+ bus_size_t iosize;
const char *intrstr;
u_int16_t k1;
int i;
if (pci_mapreg_map(pa, 0x10, PCI_MAPREG_TYPE_IO, 0, &sc->sc_iot,
- &sc->sc_ioh, &sc->sc_ioaddr, &sc->sc_iosize, 0)) {
+ &sc->sc_ioh, NULL, &iosize, 0)) {
printf(": can't map i/o space\n");
return;
}
@@ -199,20 +200,20 @@ fms_attach(parent, self, aux)
if (bus_space_subregion(sc->sc_iot, sc->sc_ioh, 0x30, 2,
&sc->sc_mpu_ioh)) {
printf(": can't get mpu subregion handle\n");
- bus_space_unmap(sc->sc_iot, sc->sc_ioh, sc->sc_iosize);
+ bus_space_unmap(sc->sc_iot, sc->sc_ioh, iosize);
return;
}
if (bus_space_subregion(sc->sc_iot, sc->sc_ioh, 0x68, 4,
&sc->sc_opl_ioh)) {
printf(": can't get opl subregion handle\n");
- bus_space_unmap(sc->sc_iot, sc->sc_ioh, sc->sc_iosize);
+ bus_space_unmap(sc->sc_iot, sc->sc_ioh, iosize);
return;
}
if (pci_intr_map(pa, &ih)) {
printf(": couldn't map interrupt\n");
- bus_space_unmap(sc->sc_iot, sc->sc_ioh, sc->sc_iosize);
+ bus_space_unmap(sc->sc_iot, sc->sc_ioh, iosize);
return;
}
intrstr = pci_intr_string(pc, ih);
@@ -224,7 +225,7 @@ fms_attach(parent, self, aux)
if (intrstr != NULL)
printf(" at %s", intrstr);
printf("\n");
- bus_space_unmap(sc->sc_iot, sc->sc_ioh, sc->sc_iosize);
+ bus_space_unmap(sc->sc_iot, sc->sc_ioh, iosize);
return;
}
diff --git a/sys/dev/pci/fmsvar.h b/sys/dev/pci/fmsvar.h
index aacfb2b2985..5f3ff9a0fef 100644
--- a/sys/dev/pci/fmsvar.h
+++ b/sys/dev/pci/fmsvar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: fmsvar.h,v 1.4 2002/05/28 04:19:53 mickey Exp $ */
+/* $OpenBSD: fmsvar.h,v 1.5 2002/05/29 14:30:21 mickey Exp $ */
/* $NetBSD: fmsvar.h,v 1.1 1999/11/01 21:54:12 augustss Exp $ */
/*-
@@ -47,8 +47,6 @@ struct fms_softc {
bus_space_tag_t sc_iot;
bus_space_handle_t sc_ioh;
- bus_addr_t sc_ioaddr;
- bus_size_t sc_iosize;
bus_dma_tag_t sc_dmat;
bus_space_handle_t sc_opl_ioh;