[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH qom-next for-1.6 08/20] exynos4210_pwm: QOM cast cle
From: |
Andreas Färber |
Subject: |
[Qemu-devel] [PATCH qom-next for-1.6 08/20] exynos4210_pwm: QOM cast cleanup |
Date: |
Sat, 27 Jul 2013 15:36:51 +0200 |
Signed-off-by: Andreas Färber <address@hidden>
---
hw/timer/exynos4210_pwm.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/hw/timer/exynos4210_pwm.c b/hw/timer/exynos4210_pwm.c
index 8fa0bb2..a52f0f6 100644
--- a/hw/timer/exynos4210_pwm.c
+++ b/hw/timer/exynos4210_pwm.c
@@ -97,9 +97,13 @@ typedef struct {
} Exynos4210PWM;
+#define TYPE_EXYNOS4210_PWM "exynos4210.pwm"
+#define EXYNOS4210_PWM(obj) \
+ OBJECT_CHECK(Exynos4210PWMState, (obj), TYPE_EXYNOS4210_PWM)
typedef struct Exynos4210PWMState {
- SysBusDevice busdev;
+ SysBusDevice parent_obj;
+
MemoryRegion iomem;
uint32_t reg_tcfg[2];
@@ -352,7 +356,7 @@ static void exynos4210_pwm_write(void *opaque, hwaddr
offset,
*/
static void exynos4210_pwm_reset(DeviceState *d)
{
- Exynos4210PWMState *s = (Exynos4210PWMState *)d;
+ Exynos4210PWMState *s = EXYNOS4210_PWM(d);
int i;
s->reg_tcfg[0] = 0x0101;
s->reg_tcfg[1] = 0x0;
@@ -378,7 +382,7 @@ static const MemoryRegionOps exynos4210_pwm_ops = {
*/
static int exynos4210_pwm_init(SysBusDevice *dev)
{
- Exynos4210PWMState *s = FROM_SYSBUS(Exynos4210PWMState, dev);
+ Exynos4210PWMState *s = EXYNOS4210_PWM(dev);
int i;
QEMUBH *bh;
@@ -408,7 +412,7 @@ static void exynos4210_pwm_class_init(ObjectClass *klass,
void *data)
}
static const TypeInfo exynos4210_pwm_info = {
- .name = "exynos4210.pwm",
+ .name = TYPE_EXYNOS4210_PWM,
.parent = TYPE_SYS_BUS_DEVICE,
.instance_size = sizeof(Exynos4210PWMState),
.class_init = exynos4210_pwm_class_init,
--
1.8.1.4
- [Qemu-devel] [PATCH qom-next for-1.6 00/20] timer: QOM cast cleanups, Andreas Färber, 2013/07/27
- [Qemu-devel] [PATCH qom-next for-1.6 03/20] arm_timer: QOM cast cleanup for icp_pit_state, Andreas Färber, 2013/07/27
- [Qemu-devel] [PATCH qom-next for-1.6 02/20] arm_timer: QOM cast cleanup for SP804State, Andreas Färber, 2013/07/27
- [Qemu-devel] [PATCH qom-next for-1.6 04/20] cadence_ttc: QOM cast cleanup, Andreas Färber, 2013/07/27
- [Qemu-devel] [PATCH qom-next for-1.6 01/20] arm_timer: Rename sp804_state to SP804State, Andreas Färber, 2013/07/27
- [Qemu-devel] [PATCH qom-next for-1.6 05/20] etraxfs_timer: Rename etrax_timer to ETRAXTimerState, Andreas Färber, 2013/07/27
- [Qemu-devel] [PATCH qom-next for-1.6 06/20] etraxfs_timer: QOM cast cleanup, Andreas Färber, 2013/07/27
- [Qemu-devel] [PATCH qom-next for-1.6 07/20] exynos4210_mct: QOM cast cleanup, Andreas Färber, 2013/07/27
- [Qemu-devel] [PATCH qom-next for-1.6 08/20] exynos4210_pwm: QOM cast cleanup,
Andreas Färber <=
- [Qemu-devel] [PATCH qom-next for-1.6 11/20] lm32_timer: QOM cast cleanup, Andreas Färber, 2013/07/27
- [Qemu-devel] [PATCH qom-next for-1.6 09/20] exynos4210_rtc: QOM cast cleanup, Andreas Färber, 2013/07/27
- [Qemu-devel] [PATCH qom-next for-1.6 13/20] milkymist-sysctl: QOM cast cleanup, Andreas Färber, 2013/07/27
- [Qemu-devel] [PATCH qom-next for-1.6 10/20] grlib_gptimer: QOM cast cleanup, Andreas Färber, 2013/07/27
- [Qemu-devel] [PATCH qom-next for-1.6 12/20] m48t59: QOM cast cleanup for M48t59SysBusState, Andreas Färber, 2013/07/27
- [Qemu-devel] [PATCH qom-next for-1.6 15/20] pl031: QOM cast cleanup, Andreas Färber, 2013/07/27
- [Qemu-devel] [PATCH qom-next for-1.6 16/20] puv3_ost: QOM cast cleanup, Andreas Färber, 2013/07/27
- [Qemu-devel] [PATCH qom-next for-1.6 14/20] pl031: Rename pl031_state to PL031State, Andreas Färber, 2013/07/27
- [Qemu-devel] [PATCH qom-next for-1.6 19/20] tusb6010: QOM cast cleanup, Andreas Färber, 2013/07/27
- [Qemu-devel] [PATCH qom-next for-1.6 17/20] pxa2xx_timer: QOM cast cleanup, Andreas Färber, 2013/07/27