bus_alloc_resource -> bus_alloc_resource_any
[dragonfly.git] / sys / dev / disk / aic7xxx / ahd_pci.c
index d0b8565..8a9a877 100644 (file)
@@ -30,8 +30,8 @@
  *
  * $Id: //depot/aic7xxx/freebsd/dev/aic7xxx/ahd_pci.c#17 $
  *
- * $FreeBSD: src/sys/dev/aic7xxx/ahd_pci.c,v 1.15 2003/12/17 00:02:09 gibbs Exp $
- * $DragonFly: src/sys/dev/disk/aic7xxx/ahd_pci.c,v 1.9 2007/07/06 00:01:16 pavalos Exp $
+ * $FreeBSD: src/sys/dev/aic7xxx/ahd_pci.c,v 1.16 2004/03/17 17:50:25 njl Exp $
+ * $DragonFly: src/sys/dev/disk/aic7xxx/ahd_pci.c,v 1.10 2007/07/06 01:11:07 pavalos Exp $
  */
 
 #include "aic79xx_osm.h"
@@ -169,8 +169,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,
-                                         &regs_id, 0, ~0, 1, RF_ACTIVE);
+               regs = bus_alloc_resource_any(ahd->dev_softc, regs_type,
+                                             &regs_id, RF_ACTIVE);
                if (regs != NULL) {
                        int error;
 
@@ -207,8 +207,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,
-                                         &regs_id, 0, ~0, 1, RF_ACTIVE);
+               regs = bus_alloc_resource_any(ahd->dev_softc, regs_type,
+                                             &regs_id, RF_ACTIVE);
                if (regs == NULL) {
                        device_printf(ahd->dev_softc,
                                      "can't allocate register resources\n");
@@ -219,8 +219,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,
-                                          &regs_id2, 0, ~0, 1, RF_ACTIVE);
+               regs2 = bus_alloc_resource_any(ahd->dev_softc, regs_type,
+                                              &regs_id2, RF_ACTIVE);
                if (regs2 == NULL) {
                        device_printf(ahd->dev_softc,
                                      "can't allocate register resources\n");
@@ -248,8 +248,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;