lr->caps & AHCI_CAP_EMS) == 0) { break; - } else if (*rid == 0) { + } else if (rid == 0) { offset = AHCI_EM_CTL; size = 4; } else { offset = (ctlr->emloc & 0xffff0000) >> 14; size = (ctlr->emloc & 0x0000ffff) << 2; - if (*rid != 1) { - if (*rid == 2 && (ctlr->capsem & + if (rid != 1) { + if (rid == 2 && (ctlr->capsem & (AHCI_EM_XMT | AHCI_EM_SMB)) == 0) offset += size; else @@ -634,7 +634,7 @@ ahci_alloc_resource(device_t dev, device_t child, int type, int *rid, } break; case SYS_RES_IRQ: - if (*rid == ATA_IRQ_RID) + if (rid == ATA_IRQ_RID) res = ctlr->irqs[0].r_irq; break; } diff --git a/sys/dev/ahci/ahci.h b/sys/dev/ahci/ahci.h index 8b51b1e0b3ae..d72e332fab79 100644 --- a/sys/dev/ahci/ahci.h +++ b/sys/dev/ahci/ahci.h @@ -654,7 +654,7 @@ int ahci_attach(device_t dev); int ahci_detach(device_t dev); int ahci_setup_interrupt(device_t dev); int ahci_print_child(device_t dev, device_t child); -struct resource *ahci_alloc_resource(device_t dev, device_t child, int type, int *rid, +struct resource *ahci_alloc_resource(device_t dev, device_t child, int type, int rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags); int ahci_release_resource(device_t dev, device_t child, struct resource *r); int ahci_setup_intr(device_t dev, device_t child, struct resource *irq, diff --git a/sys/dev/ata/ata-pci.c b/sys/dev/ata/ata-pci.c index cb44f98c406d..9ac9da092bc7 100644 --- a/sys/dev/ata/ata-pci.c +++ b/sys/dev/ata/ata-pci.c @@ -216,7 +216,7 @@ ata_pci_write_config(device_t dev, device_t child, int reg, } struct resource * -ata_pci_alloc_resource(device_t dev, device_t child, int type, int *rid, +ata_pci_alloc_resource(device_t dev, device_t child, int type, int rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { @@ -228,7 +228,7 @@ ata_pci_alloc_resource(device_t dev, device_t child, int type, int *rid, int myrid; if (type == SYS_RES_IOPORT) { - switch (*rid) { + switch (rid) { case ATA_IOADDR_RID: if (controller->legacy) { start = (unit ? ATA_SECONDARY : ATA_PRIMARY); @@ -237,7 +237,7 @@ ata_pci_alloc_resource(device_t dev, device_t child, int type, int *rid, } myrid = PCIR_BAR(0) + (unit << 3); res = BUS_ALLOC_RESOURCE(device_get_parent(dev), dev, - SYS_RES_IOPORT, &myrid, + SYS_RES_IOPORT, myrid, start, end, count, flags); break; case ATA_CTLADDR_RID: @@ -249,12 +249,12 @@ ata_pci_alloc_resource(device_t dev, device_t child, int type, int *rid, } myrid = PCIR_BAR(1) + (unit << 3); res = BUS_ALLOC_RESOURCE(device_get_parent(dev), dev, - SYS_RES_IOPORT, &myrid, + SYS_RES_IOPORT, myrid, start, end, count, flags); break; } } - if (type == SYS_RES_IRQ && *rid == ATA_IRQ_RID) { + if (type == SYS_RES_IRQ && rid == ATA_IRQ_RID) { if (controller->legacy) { int irq = (unit == 0 ? 14 : 15); @@ -265,7 +265,7 @@ ata_pci_alloc_resource(device_t dev, device_t child, int type, int *rid, } } else { if (type == SYS_RES_IRQ) { - if (*rid != ATA_IRQ_RID) + if (rid != ATA_IRQ_RID) return (NULL); res = controller->r_irq; } else { diff --git a/sys/dev/ata/ata-pci.h b/sys/dev/ata/ata-pci.h index cad9441a21ae..630d0184c820 100644 --- a/sys/dev/ata/ata-pci.h +++ b/sys/dev/ata/ata-pci.h @@ -537,7 +537,7 @@ void ata_pci_write_config(device_t dev, device_t child, int reg, uint32_t val, int width); int ata_pci_print_child(device_t dev, device_t child); int ata_pci_child_location(device_t dev, device_t child, struct sbuf *sb); -struct resource * ata_pci_alloc_resource(device_t dev, device_t child, int type, int *rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags); +struct resource * ata_pci_alloc_resource(device_t dev, device_t child, int type, int rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags); int ata_pci_release_resource(device_t dev, device_t child, struct resource *r); int ata_pci_setup_intr(device_t dev, device_t child, struct resource *irq, int flags, driver_filter_t *filter, driver_intr_t *function, void *argument, void **cookiep); int ata_pci_teardown_intr(device_t dev, device_t child, struct resource *irq, void *cookie); diff --git a/sys/dev/atkbdc/atkbdc_isa.c b/sys/dev/atkbdc/atkbdc_isa.c index 057ebbc7ec0d..062c5fc491e8 100644 --- a/sys/dev/atkbdc/atkbdc_isa.c +++ b/sys/dev/atkbdc/atkbdc_isa.c @@ -50,7 +50,7 @@ static int atkbdc_isa_attach(device_t dev); static device_t atkbdc_isa_add_child(device_t bus, u_int order, const char *name, int unit); static struct resource *atkbdc_isa_alloc_resource(device_t dev, device_t child, - int type, int *rid, rman_res_t start, rman_res_t end, + int type, int rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags); static int atkbdc_isa_release_resource(device_t dev, device_t child, struct resource *r); @@ -293,13 +293,13 @@ atkbdc_isa_add_child(device_t bus, u_int order, const char *name, int unit) } struct resource * -atkbdc_isa_alloc_resource(device_t dev, device_t child, int type, int *rid, +atkbdc_isa_alloc_resource(device_t dev, device_t child, int type, int rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { atkbdc_softc_t *sc; sc = *(atkbdc_softc_t **)device_get_softc(dev); - if (type == SYS_RES_IRQ && *rid == KBDC_RID_KBD && sc->irq != NULL) + if (type == SYS_RES_IRQ && rid == KBDC_RID_KBD && sc->irq != NULL) return (sc->irq); return (bus_generic_rl_alloc_resource(dev, child, type, rid, start, end, count, flags)); diff --git a/sys/dev/bhnd/bhnd_subr.c b/sys/dev/bhnd/bhnd_subr.c index 4818fffd5659..ac4f69db8cae 100644 --- a/sys/dev/bhnd/bhnd_subr.c +++ b/sys/dev/bhnd/bhnd_subr.c @@ -2201,7 +2201,7 @@ bhnd_bus_generic_alloc_resource(device_t dev, device_t child, int type, res = NULL; /* Allocate the real bus resource (without activating it) */ - res = BUS_ALLOC_RESOURCE(dev, child, type, rid, start, end, count, + res = BUS_ALLOC_RESOURCE(dev, child, type, *rid, start, end, count, (flags & ~RF_ACTIVE)); if (res == NULL) return (NULL); diff --git a/sys/dev/bhnd/bhndb/bhndb.c b/sys/dev/bhnd/bhndb/bhndb.c index f9d56a9b9226..90ae719787dc 100644 --- a/sys/dev/bhnd/bhndb/bhndb.c +++ b/sys/dev/bhnd/bhndb/bhndb.c @@ -937,7 +937,7 @@ bhndb_get_service_registry(device_t dev, device_t child) */ static struct resource * bhndb_alloc_resource(device_t dev, device_t child, int type, - int *rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) + int rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { struct bhndb_softc *sc; struct resource_list_entry *rle; @@ -964,11 +964,11 @@ bhndb_alloc_resource(device_t dev, device_t child, int type, if (!passthrough && isdefault) { /* Fetch the resource list entry. */ rle = resource_list_find(BUS_GET_RESOURCE_LIST(dev, child), - type, *rid); + type, rid); if (rle == NULL) { device_printf(dev, "default resource %#x type %d for child %s " - "not found\n", *rid, type, + "not found\n", rid, type, device_get_nameunit(child)); return (NULL); @@ -977,7 +977,7 @@ bhndb_alloc_resource(device_t dev, device_t child, int type, if (rle->res != NULL) { device_printf(dev, "resource entry %#x type %d for child %s is busy\n", - *rid, type, device_get_nameunit(child)); + rid, type, device_get_nameunit(child)); return (NULL); } @@ -997,17 +997,17 @@ bhndb_alloc_resource(device_t dev, device_t child, int type, if (rv == NULL) return (NULL); - rman_set_rid(rv, *rid); + rman_set_rid(rv, rid); rman_set_type(rv, type); /* Activate */ if (flags & RF_ACTIVE) { - error = bus_activate_resource(child, type, *rid, rv); + error = bus_activate_resource(child, type, rid, rv); if (error) { device_printf(dev, "failed to activate entry %#x type %d for " "child %s: %d\n", - *rid, type, device_get_nameunit(child), error); + rid, type, device_get_nameunit(child), error); rman_release_resource(rv); diff --git a/sys/dev/bhnd/cores/chipc/chipc.c b/sys/dev/bhnd/cores/chipc/chipc.c index 24697a8f0b17..8d62bbcc4712 100644 --- a/sys/dev/bhnd/cores/chipc/chipc.c +++ b/sys/dev/bhnd/cores/chipc/chipc.c @@ -765,7 +765,7 @@ chipc_get_rman(device_t dev, int type, u_int flags) static struct resource * chipc_alloc_resource(device_t dev, device_t child, int type, - int *rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) + int rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { struct chipc_softc *sc; struct chipc_region *cr; @@ -793,11 +793,11 @@ chipc_alloc_resource(device_t dev, device_t child, int type, if (!passthrough && isdefault) { /* Fetch the resource list entry. */ rle = resource_list_find(BUS_GET_RESOURCE_LIST(dev, child), - type, *rid); + type, rid); if (rle == NULL) { device_printf(dev, "default resource %#x type %d for child %s " - "not found\n", *rid, type, + "not found\n", rid, type, device_get_nameunit(child)); return (NULL); } @@ -806,7 +806,7 @@ chipc_alloc_resource(device_t dev, device_t child, int type, device_printf(dev, "resource entry %#x type %d for child %s is busy " "[%d]\n", - *rid, type, device_get_nameunit(child), + rid, type, device_get_nameunit(child), rman_get_flags(rle->res)); return (NULL); diff --git a/sys/dev/dpaa/fman.c b/sys/dev/dpaa/fman.c index 6f63e50f3a14..393c28487ba9 100644 --- a/sys/dev/dpaa/fman.c +++ b/sys/dev/dpaa/fman.c @@ -148,7 +148,7 @@ fman_release_resource(device_t bus, device_t child, struct resource *res) } struct resource * -fman_alloc_resource(device_t bus, device_t child, int type, int *rid, +fman_alloc_resource(device_t bus, device_t child, int type, int rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { struct fman_softc *sc; @@ -166,7 +166,7 @@ fman_alloc_resource(device_t bus, device_t child, int type, int *rid, KASSERT(!(isdefault && passthrough), ("%s: passthrough of default allocation", __func__)); if (!passthrough) { - rle = resource_list_find(rl, type, *rid); + rle = resource_list_find(rl, type, rid); if (rle == NULL) return (NULL); KASSERT(rle->res == NULL, @@ -189,10 +189,10 @@ fman_alloc_resource(device_t bus, device_t child, int type, int *rid, end, count, flags & ~RF_ACTIVE, child); if (res == NULL) return (NULL); - rman_set_rid(res, *rid); + rman_set_rid(res, rid); rman_set_type(res, type); if ((flags & RF_ACTIVE) != 0 && bus_activate_resource( - child, type, *rid, res) != 0) { + child, type, rid, res) != 0) { rman_release_resource(res); return (NULL); } diff --git a/sys/dev/dpaa/fman.h b/sys/dev/dpaa/fman.h index 4c30a633ae3e..a2ada5e16ffb 100644 --- a/sys/dev/dpaa/fman.h +++ b/sys/dev/dpaa/fman.h @@ -54,7 +54,7 @@ struct fman_softc { * @{ */ struct resource * fman_alloc_resource(device_t bus, device_t child, int type, - int *rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags); + int rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags); int fman_activate_resource(device_t bus, device_t child, struct resource *res); int fman_release_resource(device_t bus, device_t child, struct resource *res); diff --git a/sys/dev/dpaa2/dpaa2_mc.c b/sys/dev/dpaa2/dpaa2_mc.c index 8abfc3bfe1cc..9702bdbe13ba 100644 --- a/sys/dev/dpaa2/dpaa2_mc.c +++ b/sys/dev/dpaa2/dpaa2_mc.c @@ -300,7 +300,7 @@ dpaa2_mc_detach(device_t dev) */ struct resource * -dpaa2_mc_alloc_resource(device_t mcdev, device_t child, int type, int *rid, +dpaa2_mc_alloc_resource(device_t mcdev, device_t child, int type, int rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { struct resource *res; @@ -333,7 +333,7 @@ dpaa2_mc_alloc_resource(device_t mcdev, device_t child, int type, int *rid, return (res); fail: device_printf(mcdev, "%s() failed: type=%d, rid=%d, start=%#jx, " - "end=%#jx, count=%#jx, flags=%x\n", __func__, type, *rid, start, end, + "end=%#jx, count=%#jx, flags=%x\n", __func__, type, rid, start, end, count, flags); return (NULL); } diff --git a/sys/dev/dpaa2/dpaa2_mc.h b/sys/dev/dpaa2/dpaa2_mc.h index 5ddac7aa2720..416b77a11351 100644 --- a/sys/dev/dpaa2/dpaa2_mc.h +++ b/sys/dev/dpaa2/dpaa2_mc.h @@ -181,7 +181,7 @@ int dpaa2_mc_detach(device_t dev); struct rman *dpaa2_mc_rman(device_t mcdev, int type, u_int flags); struct resource * dpaa2_mc_alloc_resource(device_t mcdev, device_t child, - int type, int *rid, rman_res_t start, rman_res_t end, rman_res_t count, + int type, int rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags); int dpaa2_mc_adjust_resource(device_t mcdev, device_t child, struct resource *r, rman_res_t start, rman_res_t end); diff --git a/sys/dev/dpaa2/dpaa2_rc.c b/sys/dev/dpaa2/dpaa2_rc.c index 3cb2fdfeaa2e..c360b6fcc929 100644 --- a/sys/dev/dpaa2/dpaa2_rc.c +++ b/sys/dev/dpaa2/dpaa2_rc.c @@ -225,7 +225,7 @@ dpaa2_rc_delete_resource(device_t rcdev, device_t child, int type, int rid) } static struct resource * -dpaa2_rc_alloc_multi_resource(device_t rcdev, device_t child, int type, int *rid, +dpaa2_rc_alloc_multi_resource(device_t rcdev, device_t child, int type, int rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { struct resource_list *rl; @@ -243,7 +243,7 @@ dpaa2_rc_alloc_multi_resource(device_t rcdev, device_t child, int type, int *rid * dedicated software portal interrupt wire. * See registers SWP_INTW0_CFG to SWP_INTW3_CFG for details. */ - if (type == SYS_RES_IRQ && *rid == 0) + if (type == SYS_RES_IRQ && rid == 0) return (NULL); return (resource_list_alloc(rl, rcdev, child, type, rid, @@ -251,7 +251,7 @@ dpaa2_rc_alloc_multi_resource(device_t rcdev, device_t child, int type, int *rid } static struct resource * -dpaa2_rc_alloc_resource(device_t rcdev, device_t child, int type, int *rid, +dpaa2_rc_alloc_resource(device_t rcdev, device_t child, int type, int rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { if (device_get_parent(child) != rcdev) diff --git a/sys/dev/exca/exca.c b/sys/dev/exca/exca.c index 44cb399cd49e..27a439f2598c 100644 --- a/sys/dev/exca/exca.c +++ b/sys/dev/exca/exca.c @@ -858,7 +858,7 @@ exca_deactivate_resource(struct exca_softc *exca, device_t child, #if 0 static struct resource * -exca_alloc_resource(struct exca_softc *sc, device_t child, int type, int *rid, +exca_alloc_resource(struct exca_softc *sc, device_t child, int type, int rid, u_long start, u_long end, u_long count, uint flags) { struct resource *res = NULL; @@ -895,10 +895,10 @@ exca_alloc_resource(struct exca_softc *sc, device_t child, int type, int *rid, start, end, count, flags & ~RF_ACTIVE); if (res == NULL) return (NULL); - cbb_insert_res(sc, res, type, *rid); + cbb_insert_res(sc, res, type, rid); if (flags & RF_ACTIVE) { - if (bus_activate_resource(child, type, *rid, res) != 0) { - bus_release_resource(child, type, *rid, res); + if (bus_activate_resource(child, type, rid, res) != 0) { + bus_release_resource(child, type, rid, res); return (NULL); } } diff --git a/sys/dev/fdt/simplebus.c b/sys/dev/fdt/simplebus.c index 3e77f13104ff..3ad6515ed3b7 100644 --- a/sys/dev/fdt/simplebus.c +++ b/sys/dev/fdt/simplebus.c @@ -48,7 +48,7 @@ */ static int simplebus_probe(device_t dev); static struct resource *simplebus_alloc_resource(device_t, device_t, int, - int *, rman_res_t, rman_res_t, rman_res_t, u_int); + int, rman_res_t, rman_res_t, rman_res_t, u_int); static void simplebus_probe_nomatch(device_t bus, device_t child); static int simplebus_print_child(device_t bus, device_t child); static device_t simplebus_add_child(device_t dev, u_int order, @@ -460,7 +460,7 @@ simplebus_get_property(device_t bus, device_t child, const char *propname, } static struct resource * -simplebus_alloc_resource(device_t bus, device_t child, int type, int *rid, +simplebus_alloc_resource(device_t bus, device_t child, int type, int rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { struct simplebus_softc *sc; @@ -478,11 +478,11 @@ simplebus_alloc_resource(device_t bus, device_t child, int type, int *rid, if ((di = device_get_ivars(child)) == NULL) return (NULL); - rle = resource_list_find(&di->rl, type, *rid); + rle = resource_list_find(&di->rl, type, rid); if (rle == NULL) { if (bootverbose) device_printf(bus, "no default resources for " - "rid = %d, type = %d\n", *rid, type); + "rid = %d, type = %d\n", rid, type); return (NULL); } start = rle->start; diff --git a/sys/dev/gpio/gpiobus.c b/sys/dev/gpio/gpiobus.c index 596e468d35f3..848abe025f52 100644 --- a/sys/dev/gpio/gpiobus.c +++ b/sys/dev/gpio/gpiobus.c @@ -864,7 +864,7 @@ gpiobus_get_rman(device_t bus, int type, u_int flags) } static struct resource * -gpiobus_alloc_resource(device_t bus, device_t child, int type, int *rid, +gpiobus_alloc_resource(device_t bus, device_t child, int type, int rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { struct resource_list *rl; @@ -876,7 +876,7 @@ gpiobus_alloc_resource(device_t bus, device_t child, int type, int *rid, rl = BUS_GET_RESOURCE_LIST(bus, child); if (rl == NULL) return (NULL); - rle = resource_list_find(rl, type, *rid); + rle = resource_list_find(rl, type, rid); if (rle == NULL) return (NULL); start = rle->start; diff --git a/sys/dev/hyperv/pcib/vmbus_pcib.c b/sys/dev/hyperv/pcib/vmbus_pcib.c index 7b755e5f9c63..c90d1e1fb028 100644 --- a/sys/dev/hyperv/pcib/vmbus_pcib.c +++ b/sys/dev/hyperv/pcib/vmbus_pcib.c @@ -1663,7 +1663,7 @@ vmbus_pcib_write_ivar(device_t dev, device_t child, int which, uintptr_t val) } static struct resource * -vmbus_pcib_alloc_resource(device_t dev, device_t child, int type, int *rid, +vmbus_pcib_alloc_resource(device_t dev, device_t child, int type, int rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { unsigned int bar_no; @@ -1687,7 +1687,7 @@ vmbus_pcib_alloc_resource(device_t dev, device_t child, int type, int *rid, if (!hpdev) return (NULL); - bar_no = PCI_RID2BAR(*rid); + bar_no = PCI_RID2BAR(rid); if (bar_no >= MAX_NUM_BARS) return (NULL); diff --git a/sys/dev/hyperv/vmbus/vmbus.c b/sys/dev/hyperv/vmbus/vmbus.c index 115d4af599ee..15683f21ea6a 100644 --- a/sys/dev/hyperv/vmbus/vmbus.c +++ b/sys/dev/hyperv/vmbus/vmbus.c @@ -92,7 +92,7 @@ static int vmbus_read_ivar(device_t, device_t, int, uintptr_t *); static int vmbus_child_pnpinfo(device_t, device_t, struct sbuf *); static struct resource *vmbus_alloc_resource(device_t dev, - device_t child, int type, int *rid, + device_t child, int type, int rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags); static int vmbus_alloc_msi(device_t bus, device_t dev, @@ -1062,7 +1062,7 @@ vmbus_sysctl_version(SYSCTL_HANDLER_ARGS) * For the release function, we can use bus_generic_release_resource(). */ static struct resource * -vmbus_alloc_resource(device_t dev, device_t child, int type, int *rid, +vmbus_alloc_resource(device_t dev, device_t child, int type, int rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { device_t parent = device_get_parent(dev); @@ -1346,7 +1346,7 @@ vmbus_fb_mmio_res(device_t dev) fb_start, fb_count, fb_height * fb_width); hv_fb_res = pcib_host_res_alloc(&sc->vmbus_mmio_res, dev, - SYS_RES_MEMORY, &rid, fb_start, fb_end, fb_count, + SYS_RES_MEMORY, rid, fb_start, fb_end, fb_count, RF_ACTIVE | rman_make_alignment_flags(PAGE_SIZE)); if (hv_fb_res && bootverbose) diff --git a/sys/dev/mvs/mvs_pci.c b/sys/dev/mvs/mvs_pci.c index f0df709db732..322da77968cf 100644 --- a/sys/dev/mvs/mvs_pci.c +++ b/sys/dev/mvs/mvs_pci.c @@ -389,7 +389,7 @@ mvs_intr(void *data) } static struct resource * -mvs_alloc_resource(device_t dev, device_t child, int type, int *rid, +mvs_alloc_resource(device_t dev, device_t child, int type, int rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { @@ -415,7 +415,7 @@ mvs_alloc_resource(device_t dev, device_t child, int type, int *rid, } break; case SYS_RES_IRQ: - if (*rid == ATA_IRQ_RID) + if (rid == ATA_IRQ_RID) res = ctlr->irq.r_irq; break; } diff --git a/sys/dev/mvs/mvs_soc.c b/sys/dev/mvs/mvs_soc.c index 5bafc07847b4..8dc5ed7a3034 100644 --- a/sys/dev/mvs/mvs_soc.c +++ b/sys/dev/mvs/mvs_soc.c @@ -329,7 +329,7 @@ mvs_intr(void *data) } static struct resource * -mvs_alloc_resource(device_t dev, device_t child, int type, int *rid, +mvs_alloc_resource(device_t dev, device_t child, int type, int rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { struct mvs_controller *ctlr = device_get_softc(dev); @@ -354,7 +354,7 @@ mvs_alloc_resource(device_t dev, device_t child, int type, int *rid, } break; case SYS_RES_IRQ: - if (*rid == ATA_IRQ_RID) + if (rid == ATA_IRQ_RID) res = ctlr->irq.r_irq; break; } diff --git a/sys/dev/ofw/ofw_pcib.c b/sys/dev/ofw/ofw_pcib.c index 0cfddd155e52..268fff0f9074 100644 --- a/sys/dev/ofw/ofw_pcib.c +++ b/sys/dev/ofw/ofw_pcib.c @@ -66,7 +66,7 @@ */ static struct rman *ofw_pcib_get_rman(device_t, int, u_int); static struct resource * ofw_pcib_alloc_resource(device_t, device_t, - int, int *, rman_res_t, rman_res_t, rman_res_t, u_int); + int, int, rman_res_t, rman_res_t, rman_res_t, u_int); static int ofw_pcib_release_resource(device_t, device_t, struct resource *); static int ofw_pcib_activate_resource(device_t, device_t, struct resource *); static int ofw_pcib_deactivate_resource(device_t, device_t, struct resource *); @@ -419,7 +419,7 @@ ofw_pcib_nranges(phandle_t node, struct ofw_pci_cell_info *info) } static struct resource * -ofw_pcib_alloc_resource(device_t bus, device_t child, int type, int *rid, +ofw_pcib_alloc_resource(device_t bus, device_t child, int type, int rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { struct ofw_pci_softc *sc; diff --git a/sys/dev/ofw/ofwbus.c b/sys/dev/ofw/ofwbus.c index d66befcb7314..d03107e53391 100644 *** 1629 LINES SKIPPED ***