]> git.hungrycats.org Git - linux/commitdiff
[PATCH] PCI list_for_each: arch-i386-pci-i386.c
authorMaximilian Attems <janitor@sternwelten.at>
Wed, 6 Oct 2004 04:51:24 +0000 (21:51 -0700)
committerGreg Kroah-Hartman <greg@kroah.com>
Wed, 6 Oct 2004 04:51:24 +0000 (21:51 -0700)
Replace for with more readable list_for_each.
Compile tested.

Signed-off-by: Domen Puncer <domen@coderock.org>
Signed-off-by: Maximilian Attems <janitor@sternwelten.at>
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
arch/i386/pci/i386.c

index b171e22838d130c62470d23b12c3dd8cf536e757..fcd4e36835c9c5ab1bb16f0c81ea450d5284d11e 100644 (file)
@@ -96,15 +96,13 @@ pcibios_align_resource(void *data, struct resource *res,
 
 static void __init pcibios_allocate_bus_resources(struct list_head *bus_list)
 {
-       struct list_head *ln;
        struct pci_bus *bus;
        struct pci_dev *dev;
        int idx;
        struct resource *r, *pr;
 
        /* Depth-First Search on bus tree */
-       for (ln=bus_list->next; ln != bus_list; ln=ln->next) {
-               bus = pci_bus_b(ln);
+       list_for_each_entry(bus, bus_list, node) {
                if ((dev = bus->self)) {
                        for (idx = PCI_BRIDGE_RESOURCES; idx < PCI_NUM_RESOURCES; idx++) {
                                r = &dev->resource[idx];