summaryrefslogtreecommitdiffstats
path: root/sys/dev/sound/pci/emu10k1.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/sound/pci/emu10k1.c')
-rw-r--r--sys/dev/sound/pci/emu10k1.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/sound/pci/emu10k1.c b/sys/dev/sound/pci/emu10k1.c
index f7b8d48..3752277 100644
--- a/sys/dev/sound/pci/emu10k1.c
+++ b/sys/dev/sound/pci/emu10k1.c
@@ -1478,7 +1478,7 @@ emu_pci_attach(device_t dev)
pci_write_config(dev, PCIR_COMMAND, data, 2);
data = pci_read_config(dev, PCIR_COMMAND, 2);
- i = PCIR_MAPS;
+ i = PCIR_BAR(0);
sc->reg = bus_alloc_resource(dev, SYS_RES_IOPORT, &i, 0, ~0, 1, RF_ACTIVE);
if (sc->reg == NULL) {
device_printf(dev, "unable to map register space\n");
@@ -1531,7 +1531,7 @@ emu_pci_attach(device_t dev)
bad:
if (codec) ac97_destroy(codec);
- if (sc->reg) bus_release_resource(dev, SYS_RES_IOPORT, PCIR_MAPS, sc->reg);
+ if (sc->reg) bus_release_resource(dev, SYS_RES_IOPORT, PCIR_BAR(0), sc->reg);
if (sc->ih) bus_teardown_intr(dev, sc->irq, sc->ih);
if (sc->irq) bus_release_resource(dev, SYS_RES_IRQ, 0, sc->irq);
if (sc->parent_dmat) bus_dma_tag_destroy(sc->parent_dmat);
@@ -1554,7 +1554,7 @@ emu_pci_detach(device_t dev)
/* shutdown chip */
emu_uninit(sc);
- bus_release_resource(dev, SYS_RES_IOPORT, PCIR_MAPS, sc->reg);
+ bus_release_resource(dev, SYS_RES_IOPORT, PCIR_BAR(0), sc->reg);
bus_teardown_intr(dev, sc->irq, sc->ih);
bus_release_resource(dev, SYS_RES_IRQ, 0, sc->irq);
bus_dma_tag_destroy(sc->parent_dmat);
OpenPOWER on IntegriCloud