aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBlue Swirl <blauwirbel@gmail.com>2009-07-17 11:01:47 +0000
committerBlue Swirl <blauwirbel@gmail.com>2009-07-17 11:01:47 +0000
commitf6e097e71ea7b64c56f95ef2068b7d7178feba56 (patch)
treebf03ec0acbb6ba0b34e67b8a41cb696490bfa002
parent96555a96d724016e13190b28cffa3bc929ac60dc (diff)
Fix sparc-softmmu breakage by ee6847d19be16c789b8bd4e553b7cd6701ba1245
Move the qdev_init(dev); call after the setting of d->size. Thanks to Filip Navara. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
-rw-r--r--hw/sun4m.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/sun4m.c b/hw/sun4m.c
index 4954ba37da..c810b35984 100644
--- a/hw/sun4m.c
+++ b/hw/sun4m.c
@@ -510,11 +510,11 @@ static void ram_init(target_phys_addr_t addr, ram_addr_t RAM_size,
exit(1);
}
dev = qdev_create(NULL, "memory");
- qdev_init(dev);
s = sysbus_from_qdev(dev);
d = FROM_SYSBUS(RamDevice, s);
d->size = RAM_size;
+ qdev_init(dev);
sysbus_mmio_map(s, 0, addr);
}