Fix sparc-softmmu breakage by ee6847d19b
Move the qdev_init(dev); call after the setting of d->size. Thanks to Filip Navara. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
This commit is contained in:
parent
96555a96d7
commit
f6e097e71e
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user