aboutsummaryrefslogtreecommitdiff
path: root/include/hw/char/pl011.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/hw/char/pl011.h')
-rw-r--r--include/hw/char/pl011.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/include/hw/char/pl011.h b/include/hw/char/pl011.h
index bed758350f..80de4ecde6 100644
--- a/include/hw/char/pl011.h
+++ b/include/hw/char/pl011.h
@@ -19,14 +19,17 @@
#include "hw/sysbus.h"
#include "chardev/char-fe.h"
#include "qapi/error.h"
+#include "qom/object.h"
#define TYPE_PL011 "pl011"
-#define PL011(obj) OBJECT_CHECK(PL011State, (obj), TYPE_PL011)
+typedef struct PL011State PL011State;
+DECLARE_INSTANCE_CHECKER(PL011State, PL011,
+ TYPE_PL011)
/* This shares the same struct (and cast macro) as the base pl011 device */
#define TYPE_PL011_LUMINARY "pl011_luminary"
-typedef struct PL011State {
+struct PL011State {
SysBusDevice parent_obj;
MemoryRegion iomem;
@@ -49,7 +52,7 @@ typedef struct PL011State {
CharBackend chr;
qemu_irq irq[6];
const unsigned char *id;
-} PL011State;
+};
static inline DeviceState *pl011_create(hwaddr addr,
qemu_irq irq,