9ae3a8
From 7529646c9b02c1e122b6f3972fd034be651962cc Mon Sep 17 00:00:00 2001
9ae3a8
Message-Id: <7529646c9b02c1e122b6f3972fd034be651962cc.1387298827.git.minovotn@redhat.com>
9ae3a8
In-Reply-To: <3ed0fb61a3dc912ef036d7ef450bed192090709e.1387298827.git.minovotn@redhat.com>
9ae3a8
References: <3ed0fb61a3dc912ef036d7ef450bed192090709e.1387298827.git.minovotn@redhat.com>
9ae3a8
From: "Michael S. Tsirkin" <mst@redhat.com>
9ae3a8
Date: Tue, 17 Dec 2013 15:17:32 +0100
9ae3a8
Subject: [PATCH 17/56] pc: add I440FX QOM cast macro
9ae3a8
MIME-Version: 1.0
9ae3a8
Content-Type: text/plain; charset=UTF-8
9ae3a8
Content-Transfer-Encoding: 8bit
9ae3a8
9ae3a8
RH-Author: Michael S. Tsirkin <mst@redhat.com>
9ae3a8
Message-id: <1387293161-4085-18-git-send-email-mst@redhat.com>
9ae3a8
Patchwork-id: 56323
9ae3a8
O-Subject: [PATCH qemu-kvm RHEL7.0 v2 17/57] pc: add I440FX QOM cast macro
9ae3a8
Bugzilla: 1034876
9ae3a8
RH-Acked-by: Igor Mammedov <imammedo@redhat.com>
9ae3a8
RH-Acked-by: Marcel Apfelbaum <marcel.a@redhat.com>
9ae3a8
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
9ae3a8
9ae3a8
From: Igor Mammedov <imammedo@redhat.com>
9ae3a8
9ae3a8
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
9ae3a8
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
9ae3a8
Reviewed-by: Andreas Färber <afaerber@suse.de>
9ae3a8
Message-id: 1375109277-25561-3-git-send-email-imammedo@redhat.com
9ae3a8
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
9ae3a8
(cherry picked from commit 1d0d4aa412eef7d98e53c313c79c359f2f65376e)
9ae3a8
---
9ae3a8
 hw/pci-host/piix.c | 8 ++++++--
9ae3a8
 1 file changed, 6 insertions(+), 2 deletions(-)
9ae3a8
9ae3a8
Signed-off-by: Michal Novotny <minovotn@redhat.com>
9ae3a8
---
9ae3a8
 hw/pci-host/piix.c | 8 ++++++--
9ae3a8
 1 file changed, 6 insertions(+), 2 deletions(-)
9ae3a8
9ae3a8
diff --git a/hw/pci-host/piix.c b/hw/pci-host/piix.c
9ae3a8
index 8894c03..adc094a 100644
9ae3a8
--- a/hw/pci-host/piix.c
9ae3a8
+++ b/hw/pci-host/piix.c
9ae3a8
@@ -38,6 +38,10 @@
9ae3a8
  * http://download.intel.com/design/chipsets/datashts/29054901.pdf
9ae3a8
  */
9ae3a8
 
9ae3a8
+#define TYPE_I440FX_PCI_HOST_BRIDGE "i440FX-pcihost"
9ae3a8
+#define I440FX_PCI_HOST_BRIDGE(obj) \
9ae3a8
+    OBJECT_CHECK(I440FXState, (obj), TYPE_I440FX_PCI_HOST_BRIDGE)
9ae3a8
+
9ae3a8
 typedef struct I440FXState {
9ae3a8
     PCIHostState parent_obj;
9ae3a8
 } I440FXState;
9ae3a8
@@ -245,7 +249,7 @@ PCIBus *i440fx_init(PCII440FXState **pi440fx_state,
9ae3a8
     PCII440FXState *f;
9ae3a8
     unsigned i;
9ae3a8
 
9ae3a8
-    dev = qdev_create(NULL, "i440FX-pcihost");
9ae3a8
+    dev = qdev_create(NULL, TYPE_I440FX_PCI_HOST_BRIDGE);
9ae3a8
     s = PCI_HOST_BRIDGE(dev);
9ae3a8
     b = pci_bus_new(dev, NULL, pci_address_space,
9ae3a8
                     address_space_io, 0, TYPE_PCI_BUS);
9ae3a8
@@ -627,7 +631,7 @@ static void i440fx_pcihost_class_init(ObjectClass *klass, void *data)
9ae3a8
 }
9ae3a8
 
9ae3a8
 static const TypeInfo i440fx_pcihost_info = {
9ae3a8
-    .name          = "i440FX-pcihost",
9ae3a8
+    .name          = TYPE_I440FX_PCI_HOST_BRIDGE,
9ae3a8
     .parent        = TYPE_PCI_HOST_BRIDGE,
9ae3a8
     .instance_size = sizeof(I440FXState),
9ae3a8
     .class_init    = i440fx_pcihost_class_init,
9ae3a8
-- 
9ae3a8
1.7.11.7
9ae3a8