From c25cc11ae32e10a7d0c9f04c29bfb7eca4d9c210 Mon Sep 17 00:00:00 2001 From: Myles Watson Date: Fri, 21 May 2010 14:33:48 +0000 Subject: Use lists instead of arrays for resources in devices to reduce memory usage. Signed-off-by: Myles Watson Acked-by: Patrick Georgi git-svn-id: svn://svn.coreboot.org/coreboot/trunk@5576 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1 --- src/superio/smsc/lpc47n217/superio.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/superio/smsc/lpc47n217') diff --git a/src/superio/smsc/lpc47n217/superio.c b/src/superio/smsc/lpc47n217/superio.c index cd4b539795..085331eaa7 100644 --- a/src/superio/smsc/lpc47n217/superio.c +++ b/src/superio/smsc/lpc47n217/superio.c @@ -99,15 +99,15 @@ static void enable_dev(device_t dev) */ static void lpc47n217_pnp_set_resources(device_t dev) { - int i; + struct resource *res; pnp_enter_conf_state(dev); /* NOTE: Cannot use pnp_set_resources() here because it assumes chip * support for logical devices, which the LPC47N217 doesn't have */ - for(i = 0; i < dev->resources; i++) - lpc47n217_pnp_set_resource(dev, &dev->resource[i]); + for(res = dev->resource_list; res; res = res->next) + lpc47n217_pnp_set_resource(dev, res); /* dump_pnp_device(dev); */ -- cgit v1.2.3