summary refs log tree commit diff stats
path: root/include/hw/misc/bcm2835_mbox.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/hw/misc/bcm2835_mbox.h')
-rw-r--r--include/hw/misc/bcm2835_mbox.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/include/hw/misc/bcm2835_mbox.h b/include/hw/misc/bcm2835_mbox.h
index 57f95cc35e..d8c8017f4e 100644
--- a/include/hw/misc/bcm2835_mbox.h
+++ b/include/hw/misc/bcm2835_mbox.h
@@ -10,10 +10,12 @@
 
 #include "bcm2835_mbox_defs.h"
 #include "hw/sysbus.h"
+#include "qom/object.h"
 
 #define TYPE_BCM2835_MBOX "bcm2835-mbox"
-#define BCM2835_MBOX(obj) \
-        OBJECT_CHECK(BCM2835MboxState, (obj), TYPE_BCM2835_MBOX)
+typedef struct BCM2835MboxState BCM2835MboxState;
+DECLARE_INSTANCE_CHECKER(BCM2835MboxState, BCM2835_MBOX,
+                         TYPE_BCM2835_MBOX)
 
 typedef struct {
     uint32_t reg[MBOX_SIZE];
@@ -22,7 +24,7 @@ typedef struct {
     uint32_t config;
 } BCM2835Mbox;
 
-typedef struct {
+struct BCM2835MboxState {
     /*< private >*/
     SysBusDevice busdev;
     /*< public >*/
@@ -34,6 +36,6 @@ typedef struct {
     bool mbox_irq_disabled;
     bool available[MBOX_CHAN_COUNT];
     BCM2835Mbox mbox[2];
-} BCM2835MboxState;
+};
 
 #endif