[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 2/7] pc: add I440FX QOM cast macro
From: |
Igor Mammedov |
Subject: |
[Qemu-devel] [PATCH 2/7] pc: add I440FX QOM cast macro |
Date: |
Mon, 29 Jul 2013 16:47:52 +0200 |
Signed-off-by: Igor Mammedov <address@hidden>
---
v2:
* add _BRIDGE suffix to type and cast macros
---
hw/pci-host/piix.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/hw/pci-host/piix.c b/hw/pci-host/piix.c
index 3908860..39e9c55 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_BRIDGE "i440FX-pcihost"
+#define I440FX_PCI_HOST_BRIDGE(obj) \
+ OBJECT_CHECK(I440FXState, (obj), TYPE_I440FX_PCI_HOST_BRIDGE)
+
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_BRIDGE);
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_BRIDGE,
.parent = TYPE_PCI_HOST_BRIDGE,
.instance_size = sizeof(I440FXState),
.instance_init = i440fx_pcihost_initfn,
--
1.7.1
- [Qemu-devel] [PATCH for-1.6 v3 0/7] pc: limit 64 bit hole to 2G by default, Igor Mammedov, 2013/07/29
- [Qemu-devel] [PATCH 1/7] pc: move IO_APIC_DEFAULT_ADDRESS to include/hw/i386/ioapic.h, Igor Mammedov, 2013/07/29
- [Qemu-devel] [PATCH 2/7] pc: add I440FX QOM cast macro,
Igor Mammedov <=
- [Qemu-devel] [PATCH 3/7] pc: replace i440fx_common_init() with i440fx_init(), Igor Mammedov, 2013/07/29
- [Qemu-devel] [PATCH 4/7] pc: add Q35 to QOM composition tree under /machine, Igor Mammedov, 2013/07/29
- [Qemu-devel] [PATCH 5/7] qapi: make visit_type_size fallback to type_int, Igor Mammedov, 2013/07/29
- [Qemu-devel] [PATCH 6/7] qdev: Add SIZE type to qdev properties, Igor Mammedov, 2013/07/29
- [Qemu-devel] [PATCH 7/7] pc: limit 64 bit hole to 2G by default, Igor Mammedov, 2013/07/29
- Re: [Qemu-devel] [PATCH for-1.6 v3 0/7] pc: limit 64 bit hole to 2G by default, Michael S. Tsirkin, 2013/07/29