summary refs log tree commit diff stats
path: root/include/hw/timer/a9gtimer.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/hw/timer/a9gtimer.h')
-rw-r--r--include/hw/timer/a9gtimer.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/hw/timer/a9gtimer.h b/include/hw/timer/a9gtimer.h
index 81c4388784..f6fcc4bfc6 100644
--- a/include/hw/timer/a9gtimer.h
+++ b/include/hw/timer/a9gtimer.h
@@ -24,11 +24,14 @@
 #define A9GTIMER_H
 
 #include "hw/sysbus.h"
+#include "qom/object.h"
 
 #define A9_GTIMER_MAX_CPUS 4
 
 #define TYPE_A9_GTIMER "arm.cortex-a9-global-timer"
-#define A9_GTIMER(obj) OBJECT_CHECK(A9GTimerState, (obj), TYPE_A9_GTIMER)
+typedef struct A9GTimerState A9GTimerState;
+DECLARE_INSTANCE_CHECKER(A9GTimerState, A9_GTIMER,
+                         TYPE_A9_GTIMER)
 
 #define R_COUNTER_LO                0x00
 #define R_COUNTER_HI                0x04
@@ -55,7 +58,6 @@
 #define R_AUTO_INCREMENT            0x18
 
 typedef struct A9GTimerPerCPU A9GTimerPerCPU;
-typedef struct A9GTimerState A9GTimerState;
 
 struct A9GTimerPerCPU {
     A9GTimerState *parent;