aboutsummaryrefslogtreecommitdiff
path: root/hw/gpio/mpc8xxx.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/gpio/mpc8xxx.c')
-rw-r--r--hw/gpio/mpc8xxx.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/hw/gpio/mpc8xxx.c b/hw/gpio/mpc8xxx.c
index 1d99667..dac8b1b 100644
--- a/hw/gpio/mpc8xxx.c
+++ b/hw/gpio/mpc8xxx.c
@@ -24,11 +24,14 @@
#include "hw/sysbus.h"
#include "migration/vmstate.h"
#include "qemu/module.h"
+#include "qom/object.h"
#define TYPE_MPC8XXX_GPIO "mpc8xxx_gpio"
-#define MPC8XXX_GPIO(obj) OBJECT_CHECK(MPC8XXXGPIOState, (obj), TYPE_MPC8XXX_GPIO)
+typedef struct MPC8XXXGPIOState MPC8XXXGPIOState;
+DECLARE_INSTANCE_CHECKER(MPC8XXXGPIOState, MPC8XXX_GPIO,
+ TYPE_MPC8XXX_GPIO)
-typedef struct MPC8XXXGPIOState {
+struct MPC8XXXGPIOState {
SysBusDevice parent_obj;
MemoryRegion iomem;
@@ -41,7 +44,7 @@ typedef struct MPC8XXXGPIOState {
uint32_t ier;
uint32_t imr;
uint32_t icr;
-} MPC8XXXGPIOState;
+};
static const VMStateDescription vmstate_mpc8xxx_gpio = {
.name = "mpc8xxx_gpio",