summaryrefslogtreecommitdiff
path: root/src/devices/pnp_device.c
diff options
context:
space:
mode:
authorMyles Watson <mylesgw@gmail.com>2010-05-21 14:33:48 +0000
committerMyles Watson <mylesgw@gmail.com>2010-05-21 14:33:48 +0000
commitc25cc11ae32e10a7d0c9f04c29bfb7eca4d9c210 (patch)
treefb5ada475647efc61ee1f51f50e3adad4ac74b6e /src/devices/pnp_device.c
parentc5b87c8f895502b235e1619a23bd89dda955000e (diff)
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/pnp_device.c')
-rw-r--r--src/devices/pnp_device.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/devices/pnp_device.c b/src/devices/pnp_device.c
index 469487d1d2..ad14bbf89a 100644
--- a/src/devices/pnp_device.c
+++ b/src/devices/pnp_device.c
@@ -132,14 +132,14 @@ static void pnp_set_resource(device_t dev, struct resource *resource)
void pnp_set_resources(device_t dev)
{
- int i;
+ struct resource *res;
/* Select the device */
pnp_set_logical_device(dev);
/* Paranoia says I should disable the device here... */
- for(i = 0; i < dev->resources; i++) {
- pnp_set_resource(dev, &dev->resource[i]);
+ for(res = dev->resource_list; res; res = res->next) {
+ pnp_set_resource(dev, res);
}
}