[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 152/173] exynos4210_rtc: QOM cast cleanup
From: |
Andreas Färber |
Subject: |
[Qemu-devel] [PULL 152/173] exynos4210_rtc: QOM cast cleanup |
Date: |
Mon, 29 Jul 2013 21:20:09 +0200 |
Signed-off-by: Andreas Färber <address@hidden>
---
hw/timer/exynos4210_rtc.c | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/hw/timer/exynos4210_rtc.c b/hw/timer/exynos4210_rtc.c
index 7fca071..3f2c8c5 100644
--- a/hw/timer/exynos4210_rtc.c
+++ b/hw/timer/exynos4210_rtc.c
@@ -79,8 +79,13 @@
#define RTC_BASE_FREQ 32768
+#define TYPE_EXYNOS4210_RTC "exynos4210.rtc"
+#define EXYNOS4210_RTC(obj) \
+ OBJECT_CHECK(Exynos4210RTCState, (obj), TYPE_EXYNOS4210_RTC)
+
typedef struct Exynos4210RTCState {
- SysBusDevice busdev;
+ SysBusDevice parent_obj;
+
MemoryRegion iomem;
/* registers */
@@ -507,7 +512,7 @@ static void exynos4210_rtc_write(void *opaque, hwaddr
offset,
*/
static void exynos4210_rtc_reset(DeviceState *d)
{
- Exynos4210RTCState *s = (Exynos4210RTCState *)d;
+ Exynos4210RTCState *s = EXYNOS4210_RTC(d);
qemu_get_timedate(&s->current_tm, 0);
@@ -544,7 +549,7 @@ static const MemoryRegionOps exynos4210_rtc_ops = {
*/
static int exynos4210_rtc_init(SysBusDevice *dev)
{
- Exynos4210RTCState *s = FROM_SYSBUS(Exynos4210RTCState, dev);
+ Exynos4210RTCState *s = EXYNOS4210_RTC(dev);
QEMUBH *bh;
bh = qemu_bh_new(exynos4210_rtc_tick, s);
@@ -577,7 +582,7 @@ static void exynos4210_rtc_class_init(ObjectClass *klass,
void *data)
}
static const TypeInfo exynos4210_rtc_info = {
- .name = "exynos4210.rtc",
+ .name = TYPE_EXYNOS4210_RTC,
.parent = TYPE_SYS_BUS_DEVICE,
.instance_size = sizeof(Exynos4210RTCState),
.class_init = exynos4210_rtc_class_init,
--
1.8.1.4
- [Qemu-devel] [PULL 141/173] pl022: Rename pl022_state to PL022State, (continued)
- [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, 2013/07/29
- [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 <=
- [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
- [Qemu-devel] [PULL 160/173] pxa2xx_timer: QOM'ify pxa25x-timer and pxa27x-timer, Andreas Färber, 2013/07/29
- [Qemu-devel] [PULL 161/173] slavio_timer: QOM cast cleanup, Andreas Färber, 2013/07/29