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:
Blue Swirl 2009-07-17 11:01:47 +00:00
parent 96555a96d7
commit f6e097e71e
1 changed files with 1 additions and 1 deletions

View File

@ -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);
}