summary refs log tree commit diff stats
path: root/hw/i2c/mpc_i2c.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/i2c/mpc_i2c.c')
-rw-r--r--hw/i2c/mpc_i2c.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/hw/i2c/mpc_i2c.c b/hw/i2c/mpc_i2c.c
index 9a724f3a3e..232a277da4 100644
--- a/hw/i2c/mpc_i2c.c
+++ b/hw/i2c/mpc_i2c.c
@@ -24,6 +24,7 @@
 #include "qemu/module.h"
 #include "hw/sysbus.h"
 #include "migration/vmstate.h"
+#include "qom/object.h"
 
 /* #define DEBUG_I2C */
 
@@ -36,6 +37,7 @@
 #endif
 
 #define TYPE_MPC_I2C "mpc-i2c"
+typedef struct MPCI2CState MPCI2CState;
 #define MPC_I2C(obj) \
     OBJECT_CHECK(MPCI2CState, (obj), TYPE_MPC_I2C)
 
@@ -70,7 +72,7 @@
 
 #define CYCLE_RESET 0xFF
 
-typedef struct MPCI2CState {
+struct MPCI2CState {
     SysBusDevice parent_obj;
 
     I2CBus *bus;
@@ -84,7 +86,7 @@ typedef struct MPCI2CState {
     uint8_t sr;
     uint8_t dr;
     uint8_t dfssr;
-} MPCI2CState;
+};
 
 static bool mpc_i2c_is_enabled(MPCI2CState *s)
 {