diff options
author | Myles Watson <mylesgw@gmail.com> | 2010-06-09 22:41:35 +0000 |
---|---|---|
committer | Myles Watson <mylesgw@gmail.com> | 2010-06-09 22:41:35 +0000 |
commit | 894a34715f41f7c819a593dc3ff8e3033ffaa9fe (patch) | |
tree | 12ed2a5e10c6f181caa4c1add2ee8239abf82bfe /src/mainboard/tyan | |
parent | 6507b390467591928f16aab68f247321ad3f2262 (diff) |
Same conversion as with resources from static arrays to lists, except
there is no free list.
Converting resource arrays to lists reduced the size of each device
struct from 1092 to 228 bytes.
Converting link arrays to lists reduced the size of each device struct
from 228 to 68 bytes.
Signed-off-by: Myles Watson <mylesgw@gmail.com>
Acked-by: Stefan Reinauer <stepan@coresystems.de>
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@5626 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/mainboard/tyan')
-rw-r--r-- | src/mainboard/tyan/s2881/mainboard.c | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/src/mainboard/tyan/s2881/mainboard.c b/src/mainboard/tyan/s2881/mainboard.c index 773f2540a4..6c41839227 100644 --- a/src/mainboard/tyan/s2881/mainboard.c +++ b/src/mainboard/tyan/s2881/mainboard.c @@ -46,7 +46,7 @@ static void adt7463_init(device_t dev) /* Find the ADT7463 device. */ path.type = DEVICE_PATH_I2C; path.i2c.device = 0x2d; - adt7463 = find_dev_path(smbus_dev->link, &path); + adt7463 = find_dev_path(smbus_dev->link_list, &path); if (!adt7463) die("ADT7463 not found\n"); printk(BIOS_DEBUG, "ADT7463 found\n"); @@ -113,7 +113,6 @@ static unsigned int scan_root_bus(device_t root, unsigned int max) { struct device_path path; device_t dummy; - unsigned link_i; max = root_dev_scan_bus(root, max); @@ -126,20 +125,10 @@ static unsigned int scan_root_bus(device_t root, unsigned int max) * as the last device to be initialized. */ - link_i = root->links; - if (link_i >= MAX_LINKS) { - printk(BIOS_DEBUG, "Reached MAX_LINKS, not configuring ADT7463"); - return max; - } - root->link[link_i].link = link_i; - root->link[link_i].dev = root; - root->link[link_i].children = 0; - root->links++; - path.type = DEVICE_PATH_PNP; path.pnp.port = 0; path.pnp.device = 0; - dummy = alloc_dev(&root->link[link_i], &path); + dummy = alloc_dev(root->link_list, &path); dummy->ops = &dummy_operations; return max; |