Revert to Fedora kernel-2.6.17-1.2187_FC5 patched with vs2.0.2.1; there are too many...
[linux-2.6.git] / arch / i386 / pci / pcbios.c
index ed1512a..1eec086 100644 (file)
@@ -371,7 +371,8 @@ void __devinit pcibios_sort(void)
                        list_for_each(ln, &pci_devices) {
                                d = pci_dev_g(ln);
                                if (d->bus->number == bus && d->devfn == devfn) {
-                                       list_move_tail(&d->global_list, &sorted_devices);
+                                       list_del(&d->global_list);
+                                       list_add_tail(&d->global_list, &sorted_devices);
                                        if (d == dev)
                                                found = 1;
                                        break;
@@ -389,7 +390,8 @@ void __devinit pcibios_sort(void)
                if (!found) {
                        printk(KERN_WARNING "PCI: Device %s not found by BIOS\n",
                                pci_name(dev));
-                       list_move_tail(&dev->global_list, &sorted_devices);
+                       list_del(&dev->global_list);
+                       list_add_tail(&dev->global_list, &sorted_devices);
                }
        }
        list_splice(&sorted_devices, &pci_devices);