aboutsummaryrefslogtreecommitdiff
path: root/hw/audio/pl041.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/audio/pl041.c')
-rw-r--r--hw/audio/pl041.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/hw/audio/pl041.c b/hw/audio/pl041.c
index c3d3eab6ed..570a234b72 100644
--- a/hw/audio/pl041.c
+++ b/hw/audio/pl041.c
@@ -30,6 +30,7 @@
#include "pl041.h"
#include "lm4549.h"
#include "migration/vmstate.h"
+#include "qom/object.h"
#if 0
#define PL041_DEBUG_LEVEL 1
@@ -77,9 +78,11 @@ typedef struct {
} pl041_channel;
#define TYPE_PL041 "pl041"
-#define PL041(obj) OBJECT_CHECK(PL041State, (obj), TYPE_PL041)
+typedef struct PL041State PL041State;
+DECLARE_INSTANCE_CHECKER(PL041State, PL041,
+ TYPE_PL041)
-typedef struct PL041State {
+struct PL041State {
SysBusDevice parent_obj;
MemoryRegion iomem;
@@ -90,7 +93,7 @@ typedef struct PL041State {
pl041_regfile regs;
pl041_channel fifo1;
lm4549_state codec;
-} PL041State;
+};
static const unsigned char pl041_default_id[8] = {