From 6749695eaaf346c1667067e17ecc9d7d64b7f61c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Wed, 5 Feb 2014 15:21:38 +0100 Subject: nand: Don't use qdev_create() in nand_init() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Cc: Peter Crosthwaite Reviewed-by: Igor Mammedov Signed-off-by: Andreas Färber --- hw/block/nand.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'hw/block') 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) { -- cgit v1.1