]> git.proxmox.com Git - mirror_qemu.git/blobdiff - include/hw/timer/digic-timer.h
Use DECLARE_*CHECKER* macros
[mirror_qemu.git] / include / hw / timer / digic-timer.h
index ae913482c6acd3540e4c01f7f7a6772d8790c19e..84a0ef473a0198aab8c9fd29e8c00b94932a8291 100644 (file)
 #define HW_TIMER_DIGIC_TIMER_H
 
 #include "hw/sysbus.h"
-#include "qemu/typedefs.h"
 #include "hw/ptimer.h"
+#include "qom/object.h"
 
 #define TYPE_DIGIC_TIMER "digic-timer"
-#define DIGIC_TIMER(obj) OBJECT_CHECK(DigicTimerState, (obj), TYPE_DIGIC_TIMER)
+typedef struct DigicTimerState DigicTimerState;
+DECLARE_INSTANCE_CHECKER(DigicTimerState, DIGIC_TIMER,
+                         TYPE_DIGIC_TIMER)
 
 #define DIGIC_TIMER_CONTROL 0x00
 #define DIGIC_TIMER_CONTROL_RST 0x80000000
@@ -31,7 +33,7 @@
 #define DIGIC_TIMER_RELVALUE 0x08
 #define DIGIC_TIMER_VALUE 0x0c
 
-typedef struct DigicTimerState {
+struct DigicTimerState {
     /*< private >*/
     SysBusDevice parent_obj;
     /*< public >*/
@@ -41,6 +43,6 @@ typedef struct DigicTimerState {
 
     uint32_t control;
     uint32_t relvalue;
-} DigicTimerState;
+};
 
 #endif /* HW_TIMER_DIGIC_TIMER_H */