From: Blue Swirl Date: Fri, 17 Jul 2009 11:01:47 +0000 (+0000) Subject: Fix sparc-softmmu breakage by ee6847d19be16c789b8bd4e553b7cd6701ba1245 X-Git-Tag: v0.12.0-rc0~1911 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=f6e097e71ea7b64c56f95ef2068b7d7178feba56;p=qemu.git 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 --- diff --git a/hw/sun4m.c b/hw/sun4m.c index 4954ba37d..c810b3598 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); }