Same conversion as with resources from static arrays to lists, except
[coreboot.git] / src / northbridge / amd / gx2 / northbridge.c
index bb41fd057d33b698a3cd24f6c0a583c8b4a4725c..4846ac328f797b3b045884cee4c692124ea77719 100644 (file)
@@ -303,11 +303,9 @@ static void set_resources(struct device *dev)
                 pci_set_resource(dev, resource);
         }
 #endif
-        unsigned link;
+       struct bus *bus;
 
-        for(link = 0; link < dev->links; link++) {
-                struct bus *bus;
-                bus = &dev->link[link];
+       for(bus = dev->link_list; bus; bus = bus->next) {
                 if (bus->children) {
                         assign_resources(bus);
                 }
@@ -402,8 +400,8 @@ static void pci_domain_set_resources(device_t dev)
        device_t mc_dev;
         u32 pci_tolm;
 
-        pci_tolm = find_pci_tolm(&dev->link[0]);
-       mc_dev = dev->link[0].children;
+        pci_tolm = find_pci_tolm(dev->link_list);
+       mc_dev = dev->link_list->children;
        if (mc_dev) {
                unsigned int tomk, tolmk;
                unsigned int ramreg = 0;
@@ -444,7 +442,7 @@ static void pci_domain_set_resources(device_t dev)
                ram_resource(dev, idx++, 0, tolmk);
        }
 #endif
-       assign_resources(&dev->link[0]);
+       assign_resources(dev->link_list);
 }
 
 static struct device_operations pci_domain_ops = {
@@ -457,7 +455,7 @@ static struct device_operations pci_domain_ops = {
 
 static void cpu_bus_init(device_t dev)
 {
-        initialize_cpus(&dev->link[0]);
+        initialize_cpus(dev->link_list);
 }
 
 static void cpu_bus_noop(device_t dev)