From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51884) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V3LPz-0006IU-5y for qemu-devel@nongnu.org; Sun, 28 Jul 2013 03:29:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V3LPq-0001TX-Mg for qemu-devel@nongnu.org; Sun, 28 Jul 2013 03:29:27 -0400 Received: from mx1.redhat.com ([209.132.183.28]:19201) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V3LPq-0001TM-FN for qemu-devel@nongnu.org; Sun, 28 Jul 2013 03:29:18 -0400 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r6S7THSf027966 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Sun, 28 Jul 2013 03:29:18 -0400 From: Igor Mammedov Date: Sun, 28 Jul 2013 09:29:09 +0200 Message-Id: <1374996553-21828-3-git-send-email-imammedo@redhat.com> In-Reply-To: <1374996553-21828-1-git-send-email-imammedo@redhat.com> References: <1374996553-21828-1-git-send-email-imammedo@redhat.com> Subject: [Qemu-devel] [PATCH 2/6] pc: add I440FX QOM cast macro List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: mst@redhat.com Signed-off-by: Igor Mammedov --- hw/pci-host/piix.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/hw/pci-host/piix.c b/hw/pci-host/piix.c index 3908860..bf879e7 100644 --- a/hw/pci-host/piix.c +++ b/hw/pci-host/piix.c @@ -38,6 +38,10 @@ * http://download.intel.com/design/chipsets/datashts/29054901.pdf */ +#define TYPE_I440FX_PCI_HOST "i440FX-pcihost" +#define I440FX_PCI_HOST(obj) \ + OBJECT_CHECK(I440FXState, (obj), TYPE_I440FX_PCI_HOST) + typedef struct I440FXState { PCIHostState parent_obj; } I440FXState; @@ -257,7 +261,7 @@ static PCIBus *i440fx_common_init(const char *device_name, PCII440FXState *f; unsigned i; - dev = qdev_create(NULL, "i440FX-pcihost"); + dev = qdev_create(NULL, TYPE_I440FX_PCI_HOST); s = PCI_HOST_BRIDGE(dev); b = pci_bus_new(dev, NULL, pci_address_space, address_space_io, 0, TYPE_PCI_BUS); @@ -661,7 +665,7 @@ static void i440fx_pcihost_class_init(ObjectClass *klass, void *data) } static const TypeInfo i440fx_pcihost_info = { - .name = "i440FX-pcihost", + .name = TYPE_I440FX_PCI_HOST, .parent = TYPE_PCI_HOST_BRIDGE, .instance_size = sizeof(I440FXState), .instance_init = i440fx_pcihost_initfn, -- 1.8.3.1