aboutsummaryrefslogtreecommitdiff
path: root/hw/gpio/pl061.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/gpio/pl061.c')
-rw-r--r--hw/gpio/pl061.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/hw/gpio/pl061.c b/hw/gpio/pl061.c
index 6d3c36bc16..3420df0d1f 100644
--- a/hw/gpio/pl061.c
+++ b/hw/gpio/pl061.c
@@ -14,6 +14,7 @@
#include "migration/vmstate.h"
#include "qemu/log.h"
#include "qemu/module.h"
+#include "qom/object.h"
//#define DEBUG_PL061 1
@@ -34,11 +35,13 @@ static const uint8_t pl061_id_luminary[12] =
{ 0x00, 0x00, 0x00, 0x00, 0x61, 0x00, 0x18, 0x01, 0x0d, 0xf0, 0x05, 0xb1 };
#define TYPE_PL061 "pl061"
-#define PL061(obj) OBJECT_CHECK(PL061State, (obj), TYPE_PL061)
+typedef struct PL061State PL061State;
+DECLARE_INSTANCE_CHECKER(PL061State, PL061,
+ TYPE_PL061)
#define N_GPIOS 8
-typedef struct PL061State {
+struct PL061State {
SysBusDevice parent_obj;
MemoryRegion iomem;
@@ -67,7 +70,7 @@ typedef struct PL061State {
qemu_irq out[N_GPIOS];
const unsigned char *id;
uint32_t rsvd_start; /* reserved area: [rsvd_start, 0xfcc] */
-} PL061State;
+};
static const VMStateDescription vmstate_pl061 = {
.name = "pl061",