aboutsummaryrefslogtreecommitdiff
path: root/hw/intc/puv3_intc.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/intc/puv3_intc.c')
-rw-r--r--hw/intc/puv3_intc.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/hw/intc/puv3_intc.c b/hw/intc/puv3_intc.c
index 090d4839d1..8bceede256 100644
--- a/hw/intc/puv3_intc.c
+++ b/hw/intc/puv3_intc.c
@@ -12,6 +12,7 @@
#include "qemu/osdep.h"
#include "hw/irq.h"
#include "hw/sysbus.h"
+#include "qom/object.h"
#undef DEBUG_PUV3
#include "hw/unicore32/puv3.h"
@@ -19,9 +20,11 @@
#include "qemu/log.h"
#define TYPE_PUV3_INTC "puv3_intc"
-#define PUV3_INTC(obj) OBJECT_CHECK(PUV3INTCState, (obj), TYPE_PUV3_INTC)
+typedef struct PUV3INTCState PUV3INTCState;
+DECLARE_INSTANCE_CHECKER(PUV3INTCState, PUV3_INTC,
+ TYPE_PUV3_INTC)
-typedef struct PUV3INTCState {
+struct PUV3INTCState {
SysBusDevice parent_obj;
MemoryRegion iomem;
@@ -29,7 +32,7 @@ typedef struct PUV3INTCState {
uint32_t reg_ICMR;
uint32_t reg_ICPR;
-} PUV3INTCState;
+};
/* Update interrupt status after enabled or pending bits have been changed. */
static void puv3_intc_update(PUV3INTCState *s)