summaryrefslogtreecommitdiff
path: root/src/superio/smsc
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/superio/smsc
parentc5b87c8f895502b235e1619a23bd89dda955000e (diff)
downloadcoreboot-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/superio/smsc')
-rw-r--r--src/superio/smsc/lpc47n217/superio.c6
-rw-r--r--src/superio/smsc/lpc47n227/superio.c6
2 files changed, 6 insertions, 6 deletions
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); */
diff --git a/src/superio/smsc/lpc47n227/superio.c b/src/superio/smsc/lpc47n227/superio.c
index 1431908f8e..f921ed85f3 100644
--- a/src/superio/smsc/lpc47n227/superio.c
+++ b/src/superio/smsc/lpc47n227/superio.c
@@ -96,14 +96,14 @@ static void enable_dev(device_t dev)
//
void lpc47n227_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 LPC47N227 doesn't have
- for (i = 0; i < dev->resources; i++)
- lpc47n227_pnp_set_resource(dev, &dev->resource[i]);
+ for (res = dev->resource_list; res; res = res->next)
+ lpc47n227_pnp_set_resource(dev, res);
pnp_exit_conf_state(dev);
}