s/SLIST/STAILQ/
/imp/a\ pointy hat .
This commit is contained in:
parent
f9cd63d436
commit
be1bf4d2b8
@ -242,7 +242,7 @@ nexus_print_all_resources(device_t dev)
|
||||
struct resource_list *rl = &ndev->nx_resources;
|
||||
int retval = 0;
|
||||
|
||||
if (SLIST_FIRST(rl))
|
||||
if (STAILQ_FIRST(rl))
|
||||
retval += printf(" at");
|
||||
|
||||
retval += resource_list_print_type(rl, "port", SYS_RES_IOPORT, "%#lx");
|
||||
|
@ -901,7 +901,7 @@ ndis_convert_res(arg)
|
||||
block = sc->ndis_block;
|
||||
dev = sc->ndis_dev;
|
||||
|
||||
SLIST_INIT(&brl_rev);
|
||||
STAILQ_INIT(&brl_rev);
|
||||
|
||||
rl = malloc(sizeof(ndis_resource_list) +
|
||||
(sizeof(cm_partial_resource_desc) * (sc->ndis_rescnt - 1)),
|
||||
@ -932,7 +932,7 @@ ndis_convert_res(arg)
|
||||
* in order to fix this, we have to create our own
|
||||
* temporary list with the entries in reverse order.
|
||||
*/
|
||||
SLIST_FOREACH(brle, brl, link) {
|
||||
STAILQ_FOREACH(brle, brl, link) {
|
||||
n = malloc(sizeof(struct resource_list_entry),
|
||||
M_TEMP, M_NOWAIT);
|
||||
if (n == NULL) {
|
||||
@ -941,10 +941,10 @@ ndis_convert_res(arg)
|
||||
}
|
||||
bcopy((char *)brle, (char *)n,
|
||||
sizeof(struct resource_list_entry));
|
||||
SLIST_INSERT_HEAD(&brl_rev, n, link);
|
||||
STAILQ_INSERT_HEAD(&brl_rev, n, link);
|
||||
}
|
||||
|
||||
SLIST_FOREACH(brle, &brl_rev, link) {
|
||||
STAILQ_FOREACH(brle, &brl_rev, link) {
|
||||
switch (brle->type) {
|
||||
case SYS_RES_IOPORT:
|
||||
prd->cprd_type = CmResourceTypePort;
|
||||
@ -985,9 +985,9 @@ ndis_convert_res(arg)
|
||||
|
||||
bad:
|
||||
|
||||
while (!SLIST_EMPTY(&brl_rev)) {
|
||||
n = SLIST_FIRST(&brl_rev);
|
||||
SLIST_REMOVE_HEAD(&brl_rev, link);
|
||||
while (!STAILQ_EMPTY(&brl_rev)) {
|
||||
n = STAILQ_FIRST(&brl_rev);
|
||||
STAILQ_REMOVE_HEAD(&brl_rev, link);
|
||||
free (n, M_TEMP);
|
||||
}
|
||||
|
||||
|
@ -901,7 +901,7 @@ acpi_sysres_alloc(device_t dev)
|
||||
struct rman *rm;
|
||||
|
||||
rl = BUS_GET_RESOURCE_LIST(device_get_parent(dev), dev);
|
||||
SLIST_FOREACH(rle, rl, link) {
|
||||
STAILQ_FOREACH(rle, rl, link) {
|
||||
if (rle->res != NULL) {
|
||||
device_printf(dev, "duplicate resource for %lx\n", rle->start);
|
||||
continue;
|
||||
@ -947,7 +947,7 @@ acpi_sysres_find(device_t dev, int type, u_long addr)
|
||||
goto out;
|
||||
|
||||
rl = BUS_GET_RESOURCE_LIST(device_get_parent(dev), dev);
|
||||
SLIST_FOREACH(rle, rl, link) {
|
||||
STAILQ_FOREACH(rle, rl, link) {
|
||||
if (type == rle->type && addr >= rle->start &&
|
||||
addr < rle->start + rle->count)
|
||||
break;
|
||||
|
@ -691,7 +691,7 @@ acpi_sysres_attach(device_t dev)
|
||||
bus = device_get_parent(dev);
|
||||
dev_rl = BUS_GET_RESOURCE_LIST(bus, dev);
|
||||
bus_rl = BUS_GET_RESOURCE_LIST(device_get_parent(bus), bus);
|
||||
SLIST_FOREACH(dev_rle, dev_rl, link) {
|
||||
STAILQ_FOREACH(dev_rle, dev_rl, link) {
|
||||
if (dev_rle->type != SYS_RES_IOPORT && dev_rle->type != SYS_RES_MEMORY)
|
||||
continue;
|
||||
|
||||
@ -701,7 +701,7 @@ acpi_sysres_attach(device_t dev)
|
||||
type = dev_rle->type;
|
||||
done = FALSE;
|
||||
|
||||
SLIST_FOREACH(bus_rle, bus_rl, link) {
|
||||
STAILQ_FOREACH(bus_rle, bus_rl, link) {
|
||||
if (bus_rle->type != type)
|
||||
continue;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user