summary refs log tree commit diff stats
path: root/hw/arm/mcimx7d-sabre.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/arm/mcimx7d-sabre.c')
-rw-r--r--hw/arm/mcimx7d-sabre.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/hw/arm/mcimx7d-sabre.c b/hw/arm/mcimx7d-sabre.c
index 3851cd9e3e..645ad5470f 100644
--- a/hw/arm/mcimx7d-sabre.c
+++ b/hw/arm/mcimx7d-sabre.c
@@ -56,10 +56,9 @@ static void mcimx7d_sabre_init(MachineState *machine)
         di = drive_get_next(IF_SD);
         blk = di ? blk_by_legacy_dinfo(di) : NULL;
         bus = qdev_get_child_bus(DEVICE(&s->usdhc[i]), "sd-bus");
-        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);
     }
 
     if (!qtest_enabled()) {