summary refs log tree commit diff stats
path: root/include/hw/misc/unimp.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/hw/misc/unimp.h')
-rw-r--r--include/hw/misc/unimp.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/include/hw/misc/unimp.h b/include/hw/misc/unimp.h
index c63968a2cd..7c724bab94 100644
--- a/include/hw/misc/unimp.h
+++ b/include/hw/misc/unimp.h
@@ -11,19 +11,21 @@
 #include "hw/qdev-properties.h"
 #include "hw/sysbus.h"
 #include "qapi/error.h"
+#include "qom/object.h"
 
 #define TYPE_UNIMPLEMENTED_DEVICE "unimplemented-device"
 
-#define UNIMPLEMENTED_DEVICE(obj) \
-    OBJECT_CHECK(UnimplementedDeviceState, (obj), TYPE_UNIMPLEMENTED_DEVICE)
+typedef struct UnimplementedDeviceState UnimplementedDeviceState;
+DECLARE_INSTANCE_CHECKER(UnimplementedDeviceState, UNIMPLEMENTED_DEVICE,
+                         TYPE_UNIMPLEMENTED_DEVICE)
 
-typedef struct {
+struct UnimplementedDeviceState {
     SysBusDevice parent_obj;
     MemoryRegion iomem;
     unsigned offset_fmt_width;
     char *name;
     uint64_t size;
-} UnimplementedDeviceState;
+};
 
 /**
  * create_unimplemented_device: create and map a dummy device