aboutsummaryrefslogtreecommitdiff
path: root/hw/block
diff options
context:
space:
mode:
authorAndreas Färber <afaerber@suse.de>2014-02-05 15:21:38 +0100
committerAndreas Färber <afaerber@suse.de>2014-02-14 16:22:31 +0100
commit6749695eaaf346c1667067e17ecc9d7d64b7f61c (patch)
tree097e2e990a22d79eb4b8fc4f9b2364b2688a58b1 /hw/block
parent3687d5325925a9d981c86437ff52f502a1c7648a (diff)
downloadqemu-6749695eaaf346c1667067e17ecc9d7d64b7f61c.zip
qemu-6749695eaaf346c1667067e17ecc9d7d64b7f61c.tar.gz
qemu-6749695eaaf346c1667067e17ecc9d7d64b7f61c.tar.bz2
nand: Don't use qdev_create() in nand_init()
Commit 7426aa72c36c908a7d0eae3e38568bb0a70de479 (nand: Don't inherit from Sysbus) changed the parent type of TYPE_NAND but continued to use qdev_create(), which handled a NULL BusState as SysBus. Use object_new() instead, and reuse the TYPE_NAND define while at it. Reported-by: Markus Armbruster <armbru@redhat.com> Cc: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Reviewed-by: Igor Mammedov <imammedo@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'hw/block')
-rw-r--r--hw/block/nand.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/block/nand.c b/hw/block/nand.c
index a871ce0..6d7c804 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) {