*
* Copyright (c) 1997--2021 Martin Mares <mj@ucw.cz>
*
- * Can be freely distributed and used under the terms of the GNU GPL.
+ * Can be freely distributed and used under the terms of the GNU GPL v2+.
+ *
+ * SPDX-License-Identifier: GPL-2.0-or-later
*/
#include <stdarg.h>
#include "lspci.h"
-struct bridge host_bridge = { NULL, NULL, NULL, NULL, NULL, 0, ~0, 0, ~0, NULL };
+struct bridge host_bridge = { NULL, NULL, NULL, NULL, NULL, NULL, ~0, ~0, ~0, ~0, NULL };
static struct bus *
find_bus(struct bridge *b, unsigned int domain, unsigned int n)
b->subordinate = ~0;
*last_br = b;
last_br = &b->chain;
- b->prev = b->child = NULL;
+ b->prev = b->next = b->child = NULL;
b->first_bus = NULL;
b->last_bus = NULL;
b->br_dev = NULL;
}
*last_br = b;
last_br = &b->chain;
- b->prev = b->child = NULL;
+ b->prev = b->next = b->child = NULL;
b->first_bus = NULL;
b->last_bus = NULL;
b->br_dev = d;
b->subordinate = b->secondary;
*last_br = b;
last_br = &b->chain;
- b->prev = b->child = NULL;
+ b->prev = b->next = b->child = NULL;
b->first_bus = NULL;
b->last_bus = NULL;
b->br_dev = parent;
if (host_bridge.child)
{
for (b=host_bridge.child; b->prev; b=b->prev)
+ b->prev->next = b;
+ for (; b; b=b->next)
show_tree_bridge(filter, b, line, line);
}
}