diff --git a/hw/block/nand.c b/hw/block/nand.c index a871ce059add91adf0c19781e2d579ab031b5e47..6d7c804f0159c5ba4b49cfdbe83db231c647c24d 100644 --- a/hw/block/nand.c +++ b/hw/block/nand.c @@ -632,7 +632,7 @@ DeviceState *nand_init(BlockDriverState *bdrv, int manf_id, int chip_id) if (nand_flash_ids[chip_id].size == 0) { hw_error("%s: Unsupported NAND chip ID.\n", __FUNCTION__); } - dev = qdev_create(NULL, "nand"); + dev = DEVICE(object_new(TYPE_NAND)); qdev_prop_set_uint8(dev, "manufacturer_id", manf_id); qdev_prop_set_uint8(dev, "chip_id", chip_id); if (bdrv) {