Commit f6e097e71ea7b64c56f95ef2068b7d7178feba56

Authored by Blue Swirl
1 parent 96555a96

Fix sparc-softmmu breakage by ee6847d1

Move the qdev_init(dev); call after the setting of d->size.
Thanks to Filip Navara.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Showing 1 changed file with 1 additions and 1 deletions
hw/sun4m.c
... ... @@ -510,11 +510,11 @@ static void ram_init(target_phys_addr_t addr, ram_addr_t RAM_size,
510 510 exit(1);
511 511 }
512 512 dev = qdev_create(NULL, "memory");
513   - qdev_init(dev);
514 513 s = sysbus_from_qdev(dev);
515 514  
516 515 d = FROM_SYSBUS(RamDevice, s);
517 516 d->size = RAM_size;
  517 + qdev_init(dev);
518 518  
519 519 sysbus_mmio_map(s, 0, addr);
520 520 }
... ...