summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorHaavard Skinnemoen <haavard.skinnemoen@atmel.com>2008-03-27 15:24:12 +0100
committerHaavard Skinnemoen <haavard.skinnemoen@atmel.com>2008-03-27 15:31:57 +0100
commita2a395256134a24d906d5e67e03e853c580b37ed (patch)
tree752692d1d77fdad32484c6d5d50005d0de48f367 /arch
parent957ecd7dc835d40d110e8c8f460d1956420f86b1 (diff)
downloadop-kernel-dev-a2a395256134a24d906d5e67e03e853c580b37ed.zip
op-kernel-dev-a2a395256134a24d906d5e67e03e853c580b37ed.tar.gz
avr32: Fix bug in early resource allocation code
add_reserved_region() tries to keep the resource list sorted, so when looking for a place to insert the new resource, it may break out before the last entry. When this happens, the list is broken in two because the sibling field of the new entry doesn't point to the next resource. Fix it by updating the new resource's sibling field appropriately. Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/avr32/kernel/setup.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/avr32/kernel/setup.c b/arch/avr32/kernel/setup.c
index e66a07a..2687b73 100644
--- a/arch/avr32/kernel/setup.c
+++ b/arch/avr32/kernel/setup.c
@@ -163,6 +163,7 @@ add_reserved_region(resource_size_t start, resource_size_t end,
new->start = start;
new->end = end;
new->name = name;
+ new->sibling = next;
new->flags = IORESOURCE_MEM;
*pprev = new;
OpenPOWER on IntegriCloud