summaryrefslogtreecommitdiff
path: root/sys/dev/advansys/adv_pci.c
diff options
context:
space:
mode:
authorYoshihiro Takahashi <nyan@FreeBSD.org>2001-05-06 08:33:29 +0000
committerYoshihiro Takahashi <nyan@FreeBSD.org>2001-05-06 08:33:29 +0000
commit29986716bc3fa204f2fc1b7d8e623ca56ce1c408 (patch)
tree6e9111f3d67fa05fedbbae49d96cbb7092437c7c /sys/dev/advansys/adv_pci.c
parent684ac05ae8f0f1b14d181b5c48b82b064165a20c (diff)
Notes
Diffstat (limited to 'sys/dev/advansys/adv_pci.c')
-rw-r--r--sys/dev/advansys/adv_pci.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/sys/dev/advansys/adv_pci.c b/sys/dev/advansys/adv_pci.c
index 55ce7514da1e..8a83c7c513ba 100644
--- a/sys/dev/advansys/adv_pci.c
+++ b/sys/dev/advansys/adv_pci.c
@@ -136,7 +136,7 @@ adv_pci_attach(device_t dev)
struct adv_softc *adv;
u_int32_t id;
u_int32_t command;
- int error, rid;
+ int error, rid, irqrid;
void *ih;
struct resource *iores, *irqres;
@@ -173,13 +173,13 @@ adv_pci_attach(device_t dev)
if (adv_find_signature(rman_get_bustag(iores),
rman_get_bushandle(iores)) == 0) {
- bus_release_resource(dev, SYS_RES_IOPORT, 0, iores);
+ bus_release_resource(dev, SYS_RES_IOPORT, rid, iores);
return ENXIO;
}
adv = adv_alloc(dev, rman_get_bustag(iores), rman_get_bushandle(iores));
if (adv == NULL) {
- bus_release_resource(dev, SYS_RES_IOPORT, 0, iores);
+ bus_release_resource(dev, SYS_RES_IOPORT, rid, iores);
return ENXIO;
}
@@ -200,7 +200,7 @@ adv_pci_attach(device_t dev)
printf("%s: Could not allocate DMA tag - error %d\n",
adv_name(adv), error);
adv_free(adv);
- bus_release_resource(dev, SYS_RES_IOPORT, 0, iores);
+ bus_release_resource(dev, SYS_RES_IOPORT, rid, iores);
return ENXIO;
}
@@ -217,7 +217,7 @@ adv_pci_attach(device_t dev)
&overrun_dmat) != 0) {
bus_dma_tag_destroy(adv->parent_dmat);
adv_free(adv);
- bus_release_resource(dev, SYS_RES_IOPORT, 0, iores);
+ bus_release_resource(dev, SYS_RES_IOPORT, rid, iores);
return ENXIO;
}
if (bus_dmamem_alloc(overrun_dmat,
@@ -227,7 +227,7 @@ adv_pci_attach(device_t dev)
bus_dma_tag_destroy(overrun_dmat);
bus_dma_tag_destroy(adv->parent_dmat);
adv_free(adv);
- bus_release_resource(dev, SYS_RES_IOPORT, 0, iores);
+ bus_release_resource(dev, SYS_RES_IOPORT, rid, iores);
return ENXIO;
}
/* And permanently map it in */
@@ -265,7 +265,7 @@ adv_pci_attach(device_t dev)
if (adv_init(adv) != 0) {
adv_free(adv);
- bus_release_resource(dev, SYS_RES_IOPORT, 0, iores);
+ bus_release_resource(dev, SYS_RES_IOPORT, rid, iores);
return ENXIO;
}
@@ -289,13 +289,13 @@ adv_pci_attach(device_t dev)
adv->fix_asyn_xfer = ~0;
}
- rid = 0;
- irqres = bus_alloc_resource(dev, SYS_RES_IRQ, &rid, 0, ~0, 1,
+ irqrid = 0;
+ irqres = bus_alloc_resource(dev, SYS_RES_IRQ, &irqrid, 0, ~0, 1,
RF_SHAREABLE | RF_ACTIVE);
if (irqres == NULL ||
bus_setup_intr(dev, irqres, INTR_TYPE_CAM|INTR_ENTROPY, adv_intr, adv, &ih)) {
adv_free(adv);
- bus_release_resource(dev, SYS_RES_IOPORT, 0, iores);
+ bus_release_resource(dev, SYS_RES_IOPORT, rid, iores);
return ENXIO;
}