[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 136/173] sun4m: QOM cast cleanup for AFXState
From: |
Andreas Färber |
Subject: |
[Qemu-devel] [PULL 136/173] sun4m: QOM cast cleanup for AFXState |
Date: |
Mon, 29 Jul 2013 21:19:53 +0200 |
Signed-off-by: Andreas Färber <address@hidden>
---
hw/sparc/sun4m.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/hw/sparc/sun4m.c b/hw/sparc/sun4m.c
index eb3b11b..e5c6881 100644
--- a/hw/sparc/sun4m.c
+++ b/hw/sparc/sun4m.c
@@ -612,8 +612,12 @@ static const TypeInfo idreg_info = {
.class_init = idreg_class_init,
};
+#define TYPE_TCX_AFX "tcx_afx"
+#define TCX_AFX(obj) OBJECT_CHECK(AFXState, (obj), TYPE_TCX_AFX)
+
typedef struct AFXState {
- SysBusDevice busdev;
+ SysBusDevice parent_obj;
+
MemoryRegion mem;
} AFXState;
@@ -623,7 +627,7 @@ static void afx_init(hwaddr addr)
DeviceState *dev;
SysBusDevice *s;
- dev = qdev_create(NULL, "tcx_afx");
+ dev = qdev_create(NULL, TYPE_TCX_AFX);
qdev_init_nofail(dev);
s = SYS_BUS_DEVICE(dev);
@@ -632,7 +636,7 @@ static void afx_init(hwaddr addr)
static int afx_init1(SysBusDevice *dev)
{
- AFXState *s = FROM_SYSBUS(AFXState, dev);
+ AFXState *s = TCX_AFX(dev);
memory_region_init_ram(&s->mem, OBJECT(s), "sun4m.afx", 4);
vmstate_register_ram_global(&s->mem);
@@ -648,7 +652,7 @@ static void afx_class_init(ObjectClass *klass, void *data)
}
static const TypeInfo afx_info = {
- .name = "tcx_afx",
+ .name = TYPE_TCX_AFX,
.parent = TYPE_SYS_BUS_DEVICE,
.instance_size = sizeof(AFXState),
.class_init = afx_class_init,
--
1.8.1.4
- [Qemu-devel] [PULL 125/173] stellaris_enet: QOM cast cleanup, (continued)
- [Qemu-devel] [PULL 125/173] stellaris_enet: QOM cast cleanup, Andreas Färber, 2013/07/29
- [Qemu-devel] [PULL 126/173] stellaris_enet: Fix NetClientInfo::cleanup, Andreas Färber, 2013/07/29
- [Qemu-devel] [PULL 127/173] xgmac: QOM cast cleanup, Andreas Färber, 2013/07/29
- [Qemu-devel] [PULL 128/173] xilinx_ethlite: QOM cast cleanup, Andreas Färber, 2013/07/29
- [Qemu-devel] [PULL 129/173] ds1225y: Drop bogus qdev field from NvRamState, Andreas Färber, 2013/07/29
- [Qemu-devel] [PULL 131/173] ppce500_spin: QOM cast cleanup, Andreas Färber, 2013/07/29
- [Qemu-devel] [PULL 130/173] ds1225y: QOM cast cleanup for SysBusNvRamState, Andreas Färber, 2013/07/29
- [Qemu-devel] [PULL 133/173] pl181: Rename pl181_state to PL181State, Andreas Färber, 2013/07/29
- [Qemu-devel] [PULL 134/173] pl181: QOM cast cleanup, Andreas Färber, 2013/07/29
- [Qemu-devel] [PULL 132/173] milkymist-memcard: QOM cast cleanup, Andreas Färber, 2013/07/29
- [Qemu-devel] [PULL 136/173] sun4m: QOM cast cleanup for AFXState,
Andreas Färber <=
- [Qemu-devel] [PULL 135/173] sun4m: QOM cast cleanup for IDRegState, Andreas Färber, 2013/07/29
- [Qemu-devel] [PULL 138/173] sun4m: QOM cast cleanup for RamDevice, Andreas Färber, 2013/07/29
- [Qemu-devel] [PULL 137/173] sun4m: QOM cast cleanup for PROMState, Andreas Färber, 2013/07/29
- [Qemu-devel] [PULL 139/173] sun4u: QOM cast cleanup for PROMState, Andreas Färber, 2013/07/29
- [Qemu-devel] [PULL 140/173] sun4u: QOM cast cleanup for RamDevice, Andreas Färber, 2013/07/29
- [Qemu-devel] [PULL 141/173] pl022: Rename pl022_state to PL022State, Andreas Färber, 2013/07/29
- [Qemu-devel] [PULL 142/173] pl022: QOM cast cleanup, Andreas Färber, 2013/07/29
- [Qemu-devel] [PULL 144/173] arm_timer: Rename sp804_state to SP804State, Andreas Färber, 2013/07/29
- [Qemu-devel] [PULL 143/173] xilinx_spi: QOM cast cleanup, Andreas Färber, 2013/07/29
- [Qemu-devel] [PULL 145/173] arm_timer: QOM cast cleanup for SP804State, Andreas Färber, 2013/07/29