summary refs log tree commit diff stats
path: root/hw/intc/openpic_kvm.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/intc/openpic_kvm.c')
-rw-r--r--hw/intc/openpic_kvm.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/hw/intc/openpic_kvm.c b/hw/intc/openpic_kvm.c
index e4bf47d885..8c8fbeddfe 100644
--- a/hw/intc/openpic_kvm.c
+++ b/hw/intc/openpic_kvm.c
@@ -35,13 +35,15 @@
 #include "sysemu/kvm.h"
 #include "qemu/log.h"
 #include "qemu/module.h"
+#include "qom/object.h"
 
 #define GCR_RESET        0x80000000
 
-#define KVM_OPENPIC(obj) \
-    OBJECT_CHECK(KVMOpenPICState, (obj), TYPE_KVM_OPENPIC)
+typedef struct KVMOpenPICState KVMOpenPICState;
+DECLARE_INSTANCE_CHECKER(KVMOpenPICState, KVM_OPENPIC,
+                         TYPE_KVM_OPENPIC)
 
-typedef struct KVMOpenPICState {
+struct KVMOpenPICState {
     /*< private >*/
     SysBusDevice parent_obj;
     /*< public >*/
@@ -51,7 +53,7 @@ typedef struct KVMOpenPICState {
     uint32_t fd;
     uint32_t model;
     hwaddr mapped;
-} KVMOpenPICState;
+};
 
 static void kvm_openpic_set_irq(void *opaque, int n_IRQ, int level)
 {