[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 150/173] exynos4210_mct: QOM cast cleanup
From: |
Andreas Färber |
Subject: |
[Qemu-devel] [PULL 150/173] exynos4210_mct: QOM cast cleanup |
Date: |
Mon, 29 Jul 2013 21:20:07 +0200 |
Signed-off-by: Andreas Färber <address@hidden>
---
hw/timer/exynos4210_mct.c | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/hw/timer/exynos4210_mct.c b/hw/timer/exynos4210_mct.c
index 28ebe5d..a8009a4 100644
--- a/hw/timer/exynos4210_mct.c
+++ b/hw/timer/exynos4210_mct.c
@@ -240,8 +240,13 @@ typedef struct {
} Exynos4210MCTLT;
+#define TYPE_EXYNOS4210_MCT "exynos4210.mct"
+#define EXYNOS4210_MCT(obj) \
+ OBJECT_CHECK(Exynos4210MCTState, (obj), TYPE_EXYNOS4210_MCT)
+
typedef struct Exynos4210MCTState {
- SysBusDevice busdev;
+ SysBusDevice parent_obj;
+
MemoryRegion iomem;
/* Registers */
@@ -955,7 +960,7 @@ static void exynos4210_mct_update_freq(Exynos4210MCTState
*s)
/* set defaul_timer values for all fields */
static void exynos4210_mct_reset(DeviceState *d)
{
- Exynos4210MCTState *s = (Exynos4210MCTState *)d;
+ Exynos4210MCTState *s = EXYNOS4210_MCT(d);
uint32_t i;
s->reg_mct_cfg = 0;
@@ -1424,7 +1429,7 @@ static const MemoryRegionOps exynos4210_mct_ops = {
static int exynos4210_mct_init(SysBusDevice *dev)
{
int i;
- Exynos4210MCTState *s = FROM_SYSBUS(Exynos4210MCTState, dev);
+ Exynos4210MCTState *s = EXYNOS4210_MCT(dev);
QEMUBH *bh[2];
/* Global timer */
@@ -1467,7 +1472,7 @@ static void exynos4210_mct_class_init(ObjectClass *klass,
void *data)
}
static const TypeInfo exynos4210_mct_info = {
- .name = "exynos4210.mct",
+ .name = TYPE_EXYNOS4210_MCT,
.parent = TYPE_SYS_BUS_DEVICE,
.instance_size = sizeof(Exynos4210MCTState),
.class_init = exynos4210_mct_class_init,
--
1.8.1.4
- [Qemu-devel] [PULL 139/173] sun4u: QOM cast cleanup for PROMState, (continued)
- [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
- [Qemu-devel] [PULL 146/173] arm_timer: QOM cast cleanup for icp_pit_state, Andreas Färber, 2013/07/29
- [Qemu-devel] [PULL 147/173] cadence_ttc: QOM cast cleanup, Andreas Färber, 2013/07/29
- [Qemu-devel] [PULL 148/173] etraxfs_timer: Rename etrax_timer to ETRAXTimerState, Andreas Färber, 2013/07/29
- [Qemu-devel] [PULL 150/173] exynos4210_mct: QOM cast cleanup,
Andreas Färber <=
- [Qemu-devel] [PULL 149/173] etraxfs_timer: QOM cast cleanup, Andreas Färber, 2013/07/29
- [Qemu-devel] [PULL 152/173] exynos4210_rtc: QOM cast cleanup, Andreas Färber, 2013/07/29
- [Qemu-devel] [PULL 151/173] exynos4210_pwm: QOM cast cleanup, Andreas Färber, 2013/07/29
- [Qemu-devel] [PULL 153/173] grlib_gptimer: QOM cast cleanup, Andreas Färber, 2013/07/29
- [Qemu-devel] [PULL 154/173] lm32_timer: QOM cast cleanup, Andreas Färber, 2013/07/29
- [Qemu-devel] [PULL 155/173] m48t59: QOM cast cleanup for M48t59SysBusState, Andreas Färber, 2013/07/29
- [Qemu-devel] [PULL 156/173] milkymist-sysctl: QOM cast cleanup, Andreas Färber, 2013/07/29
- [Qemu-devel] [PULL 157/173] pl031: Rename pl031_state to PL031State, Andreas Färber, 2013/07/29
- [Qemu-devel] [PULL 158/173] pl031: QOM cast cleanup, Andreas Färber, 2013/07/29
- [Qemu-devel] [PULL 159/173] puv3_ost: QOM cast cleanup, Andreas Färber, 2013/07/29