diff options
author | njl <njl@FreeBSD.org> | 2004-03-17 17:50:55 +0000 |
---|---|---|
committer | njl <njl@FreeBSD.org> | 2004-03-17 17:50:55 +0000 |
commit | 05a1f56fc999f634406946e831eea6deaaa75a99 (patch) | |
tree | a1c3f00139d832c8e80338cfc56c8b1aaffd88ab /sys/dev/aic7xxx | |
parent | 2283471bb53a546e9d7dfb662c8db5ca06907c85 (diff) | |
download | FreeBSD-src-05a1f56fc999f634406946e831eea6deaaa75a99.zip FreeBSD-src-05a1f56fc999f634406946e831eea6deaaa75a99.tar.gz |
Convert callers to the new bus_alloc_resource_any(9) API.
Submitted by: Mark Santcroos <marks@ripe.net>
Reviewed by: imp, dfr, bde
Diffstat (limited to 'sys/dev/aic7xxx')
-rw-r--r-- | sys/dev/aic7xxx/ahc_eisa.c | 11 | ||||
-rw-r--r-- | sys/dev/aic7xxx/ahc_pci.c | 12 | ||||
-rw-r--r-- | sys/dev/aic7xxx/ahd_pci.c | 16 |
3 files changed, 19 insertions, 20 deletions
diff --git a/sys/dev/aic7xxx/ahc_eisa.c b/sys/dev/aic7xxx/ahc_eisa.c index d51fcdf..9c773aa 100644 --- a/sys/dev/aic7xxx/ahc_eisa.c +++ b/sys/dev/aic7xxx/ahc_eisa.c @@ -61,8 +61,7 @@ aic7770_probe(device_t dev) eisa_add_iospace(dev, iobase, AHC_EISA_IOSIZE, RESVADDR_NONE); rid = 0; - regs = bus_alloc_resource(dev, SYS_RES_IOPORT, &rid, - 0, ~0, 1, RF_ACTIVE); + regs = bus_alloc_resource_any(dev, SYS_RES_IOPORT, &rid, RF_ACTIVE); if (regs == NULL) { device_printf(dev, "Unable to map I/O space?!\n"); return ENOMEM; @@ -167,8 +166,8 @@ aic7770_map_registers(struct ahc_softc *ahc, u_int unused_ioport_arg) int rid; rid = 0; - regs = bus_alloc_resource(ahc->dev_softc, SYS_RES_IOPORT, - &rid, 0, ~0, 1, RF_ACTIVE); + regs = bus_alloc_resource_any(ahc->dev_softc, SYS_RES_IOPORT, &rid, + RF_ACTIVE); if (regs == NULL) { device_printf(ahc->dev_softc, "Unable to map I/O space?!\n"); return ENOMEM; @@ -188,8 +187,8 @@ aic7770_map_int(struct ahc_softc *ahc, int irq) zero = 0; ahc->platform_data->irq = - bus_alloc_resource(ahc->dev_softc, SYS_RES_IRQ, &zero, - 0, ~0, 1, RF_ACTIVE); + bus_alloc_resource_any(ahc->dev_softc, SYS_RES_IRQ, &zero, + RF_ACTIVE); if (ahc->platform_data->irq == NULL) return (ENOMEM); ahc->platform_data->irq_res_type = SYS_RES_IRQ; diff --git a/sys/dev/aic7xxx/ahc_pci.c b/sys/dev/aic7xxx/ahc_pci.c index 86e0a60..4050d7f 100644 --- a/sys/dev/aic7xxx/ahc_pci.c +++ b/sys/dev/aic7xxx/ahc_pci.c @@ -172,8 +172,8 @@ ahc_pci_map_registers(struct ahc_softc *ahc) regs_type = SYS_RES_MEMORY; regs_id = AHC_PCI_MEMADDR; - regs = bus_alloc_resource(ahc->dev_softc, regs_type, - ®s_id, 0, ~0, 1, RF_ACTIVE); + regs = bus_alloc_resource_any(ahc->dev_softc, regs_type, + ®s_id, RF_ACTIVE); if (regs != NULL) { ahc->tag = rman_get_bustag(regs); ahc->bsh = rman_get_bushandle(regs); @@ -204,8 +204,8 @@ ahc_pci_map_registers(struct ahc_softc *ahc) if (regs == NULL && (command & PCIM_CMD_PORTEN) != 0) { regs_type = SYS_RES_IOPORT; regs_id = AHC_PCI_IOADDR; - regs = bus_alloc_resource(ahc->dev_softc, regs_type, - ®s_id, 0, ~0, 1, RF_ACTIVE); + regs = bus_alloc_resource_any(ahc->dev_softc, regs_type, + ®s_id, RF_ACTIVE); if (regs != NULL) { ahc->tag = rman_get_bustag(regs); ahc->bsh = rman_get_bushandle(regs); @@ -245,8 +245,8 @@ ahc_pci_map_int(struct ahc_softc *ahc) zero = 0; ahc->platform_data->irq = - bus_alloc_resource(ahc->dev_softc, SYS_RES_IRQ, &zero, - 0, ~0, 1, RF_ACTIVE | RF_SHAREABLE); + bus_alloc_resource_any(ahc->dev_softc, SYS_RES_IRQ, &zero, + RF_ACTIVE | RF_SHAREABLE); if (ahc->platform_data->irq == NULL) { device_printf(ahc->dev_softc, "bus_alloc_resource() failed to allocate IRQ\n"); diff --git a/sys/dev/aic7xxx/ahd_pci.c b/sys/dev/aic7xxx/ahd_pci.c index 24cd5ab..18ac5f3 100644 --- a/sys/dev/aic7xxx/ahd_pci.c +++ b/sys/dev/aic7xxx/ahd_pci.c @@ -171,8 +171,8 @@ ahd_pci_map_registers(struct ahd_softc *ahd) regs_type = SYS_RES_MEMORY; regs_id = AHD_PCI_MEMADDR; - regs = bus_alloc_resource(ahd->dev_softc, regs_type, - ®s_id, 0, ~0, 1, RF_ACTIVE); + regs = bus_alloc_resource_any(ahd->dev_softc, regs_type, + ®s_id, RF_ACTIVE); if (regs != NULL) { int error; @@ -209,8 +209,8 @@ ahd_pci_map_registers(struct ahd_softc *ahd) if (regs == NULL && (command & PCIM_CMD_PORTEN) != 0) { regs_type = SYS_RES_IOPORT; regs_id = AHD_PCI_IOADDR0; - regs = bus_alloc_resource(ahd->dev_softc, regs_type, - ®s_id, 0, ~0, 1, RF_ACTIVE); + regs = bus_alloc_resource_any(ahd->dev_softc, regs_type, + ®s_id, RF_ACTIVE); if (regs == NULL) { device_printf(ahd->dev_softc, "can't allocate register resources\n"); @@ -221,8 +221,8 @@ ahd_pci_map_registers(struct ahd_softc *ahd) /* And now the second BAR */ regs_id2 = AHD_PCI_IOADDR1; - regs2 = bus_alloc_resource(ahd->dev_softc, regs_type, - ®s_id2, 0, ~0, 1, RF_ACTIVE); + regs2 = bus_alloc_resource_any(ahd->dev_softc, regs_type, + ®s_id2, RF_ACTIVE); if (regs2 == NULL) { device_printf(ahd->dev_softc, "can't allocate register resources\n"); @@ -250,8 +250,8 @@ ahd_pci_map_int(struct ahd_softc *ahd) zero = 0; ahd->platform_data->irq = - bus_alloc_resource(ahd->dev_softc, SYS_RES_IRQ, &zero, - 0, ~0, 1, RF_ACTIVE | RF_SHAREABLE); + bus_alloc_resource_any(ahd->dev_softc, SYS_RES_IRQ, &zero, + RF_ACTIVE | RF_SHAREABLE); if (ahd->platform_data->irq == NULL) return (ENOMEM); ahd->platform_data->irq_res_type = SYS_RES_IRQ; |