diff options
Diffstat (limited to 'src/devices/pci_device.c')
-rw-r--r-- | src/devices/pci_device.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/devices/pci_device.c b/src/devices/pci_device.c index 8863c237a4..4aed35d501 100644 --- a/src/devices/pci_device.c +++ b/src/devices/pci_device.c @@ -550,14 +550,12 @@ static void pci_set_resource(struct device *dev, struct resource *resource) void pci_dev_set_resources(struct device *dev) { - struct resource *resource, *last; + struct resource *res; unsigned link; u8 line; - last = &dev->resource[dev->resources]; - - for (resource = &dev->resource[0]; resource < last; resource++) { - pci_set_resource(dev, resource); + for (res = dev->resource_list; res; res = res->next) { + pci_set_resource(dev, res); } for (link = 0; link < dev->links; link++) { struct bus *bus; |