aboutsummaryrefslogtreecommitdiff
path: root/hw/sd/milkymist-memcard.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/sd/milkymist-memcard.c')
-rw-r--r--hw/sd/milkymist-memcard.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/hw/sd/milkymist-memcard.c b/hw/sd/milkymist-memcard.c
index be89a93876..4d3ec28f5d 100644
--- a/hw/sd/milkymist-memcard.c
+++ b/hw/sd/milkymist-memcard.c
@@ -32,6 +32,7 @@
#include "sysemu/blockdev.h"
#include "hw/qdev-properties.h"
#include "hw/sd/sd.h"
+#include "qom/object.h"
enum {
ENABLE_CMD_TX = (1<<0),
@@ -63,8 +64,9 @@ enum {
};
#define TYPE_MILKYMIST_MEMCARD "milkymist-memcard"
-#define MILKYMIST_MEMCARD(obj) \
- OBJECT_CHECK(MilkymistMemcardState, (obj), TYPE_MILKYMIST_MEMCARD)
+typedef struct MilkymistMemcardState MilkymistMemcardState;
+DECLARE_INSTANCE_CHECKER(MilkymistMemcardState, MILKYMIST_MEMCARD,
+ TYPE_MILKYMIST_MEMCARD)
#define TYPE_MILKYMIST_SDBUS "milkymist-sdbus"
@@ -83,7 +85,6 @@ struct MilkymistMemcardState {
uint8_t response[17];
uint32_t regs[R_MAX];
};
-typedef struct MilkymistMemcardState MilkymistMemcardState;
static void update_pending_bits(MilkymistMemcardState *s)
{