cryptospore / rpms / qemu-kvm

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