Merge tag 'pci-v3.15-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaa...
[linux.git] / arch / powerpc / kernel / pci_64.c
index a9e311f7a9dd58026e1fbd108ae1239415aa6153..2a4779091a5809a42b64d187224dc46da59fa07c 100644 (file)
@@ -208,7 +208,6 @@ long sys_pciconfig_iobase(long which, unsigned long in_bus,
                          unsigned long in_devfn)
 {
        struct pci_controller* hose;
-       struct list_head *ln;
        struct pci_bus *bus = NULL;
        struct device_node *hose_node;
 
@@ -230,8 +229,7 @@ long sys_pciconfig_iobase(long which, unsigned long in_bus,
         * used on pre-domains setup. We return the first match
         */
 
-       for (ln = pci_root_buses.next; ln != &pci_root_buses; ln = ln->next) {
-               bus = pci_bus_b(ln);
+       list_for_each_entry(bus, &pci_root_buses, node) {
                if (in_bus >= bus->number && in_bus <= bus->busn_res.end)
                        break;
                bus = NULL;