summaryrefslogtreecommitdiffstats
path: root/include/hw/i386/ioapic_internal.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/hw/i386/ioapic_internal.h')
-rw-r--r--include/hw/i386/ioapic_internal.h16
1 files changed, 7 insertions, 9 deletions
diff --git a/include/hw/i386/ioapic_internal.h b/include/hw/i386/ioapic_internal.h
index fe06938bda..e9cc2eaf54 100644
--- a/include/hw/i386/ioapic_internal.h
+++ b/include/hw/i386/ioapic_internal.h
@@ -25,6 +25,7 @@
#include "exec/memory.h"
#include "hw/sysbus.h"
#include "qemu/notify.h"
+#include "qom/object.h"
#define MAX_IOAPICS 1
@@ -84,21 +85,18 @@
typedef struct IOAPICCommonState IOAPICCommonState;
#define TYPE_IOAPIC_COMMON "ioapic-common"
-#define IOAPIC_COMMON(obj) \
- OBJECT_CHECK(IOAPICCommonState, (obj), TYPE_IOAPIC_COMMON)
-#define IOAPIC_COMMON_CLASS(klass) \
- OBJECT_CLASS_CHECK(IOAPICCommonClass, (klass), TYPE_IOAPIC_COMMON)
-#define IOAPIC_COMMON_GET_CLASS(obj) \
- OBJECT_GET_CLASS(IOAPICCommonClass, (obj), TYPE_IOAPIC_COMMON)
-
-typedef struct IOAPICCommonClass {
+typedef struct IOAPICCommonClass IOAPICCommonClass;
+DECLARE_OBJ_CHECKERS(IOAPICCommonState, IOAPICCommonClass,
+ IOAPIC_COMMON, TYPE_IOAPIC_COMMON)
+
+struct IOAPICCommonClass {
SysBusDeviceClass parent_class;
DeviceRealize realize;
DeviceUnrealize unrealize;
void (*pre_save)(IOAPICCommonState *s);
void (*post_load)(IOAPICCommonState *s);
-} IOAPICCommonClass;
+};
struct IOAPICCommonState {
SysBusDevice busdev;