diff options
Diffstat (limited to 'hw/arm/cubieboard.c')
-rw-r--r-- | hw/arm/cubieboard.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/hw/arm/cubieboard.c b/hw/arm/cubieboard.c index cd1b6d3e19..a96c860575 100644 --- a/hw/arm/cubieboard.c +++ b/hw/arm/cubieboard.c @@ -80,7 +80,7 @@ static void cubieboard_init(MachineState *machine) exit(1); } - object_property_set_bool(OBJECT(a10), true, "realized", &err); + qdev_realize(DEVICE(a10), NULL, &err); if (err != NULL) { error_reportf_err(err, "Couldn't realize Allwinner A10: "); exit(1); @@ -92,9 +92,9 @@ static void cubieboard_init(MachineState *machine) bus = qdev_get_child_bus(DEVICE(a10), "sd-bus"); /* Plug in SD card */ - carddev = qdev_create(bus, TYPE_SD_CARD); + carddev = qdev_new(TYPE_SD_CARD); qdev_prop_set_drive(carddev, "drive", blk, &error_fatal); - object_property_set_bool(OBJECT(carddev), true, "realized", &error_fatal); + qdev_realize_and_unref(carddev, bus, &error_fatal); memory_region_add_subregion(get_system_memory(), AW_A10_SDRAM_BASE, machine->ram); |