diff options
author | Myles Watson <mylesgw@gmail.com> | 2010-05-21 14:33:48 +0000 |
---|---|---|
committer | Myles Watson <mylesgw@gmail.com> | 2010-05-21 14:33:48 +0000 |
commit | c25cc11ae32e10a7d0c9f04c29bfb7eca4d9c210 (patch) | |
tree | fb5ada475647efc61ee1f51f50e3adad4ac74b6e /src/devices/pci_device.c | |
parent | c5b87c8f895502b235e1619a23bd89dda955000e (diff) | |
download | coreboot-c25cc11ae32e10a7d0c9f04c29bfb7eca4d9c210.tar.xz |
Use lists instead of arrays for resources in devices to reduce memory usage.
Signed-off-by: Myles Watson <mylesgw@gmail.com>
Acked-by: Patrick Georgi <patrick.georgi@coresystems.de>
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@5576 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
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; |