aboutsummaryrefslogtreecommitdiff
path: root/hw/net/milkymist-minimac2.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/net/milkymist-minimac2.c')
-rw-r--r--hw/net/milkymist-minimac2.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/hw/net/milkymist-minimac2.c b/hw/net/milkymist-minimac2.c
index 1ba01754ee..41a8543edf 100644
--- a/hw/net/milkymist-minimac2.c
+++ b/hw/net/milkymist-minimac2.c
@@ -24,6 +24,7 @@
#include "qemu/osdep.h"
#include "qapi/error.h"
+#include "qom/object.h"
#include "cpu.h" /* FIXME: why does this use TARGET_PAGE_ALIGN? */
#include "hw/irq.h"
#include "hw/qdev-properties.h"
@@ -98,8 +99,9 @@ struct MilkymistMinimac2MdioState {
typedef struct MilkymistMinimac2MdioState MilkymistMinimac2MdioState;
#define TYPE_MILKYMIST_MINIMAC2 "milkymist-minimac2"
-#define MILKYMIST_MINIMAC2(obj) \
- OBJECT_CHECK(MilkymistMinimac2State, (obj), TYPE_MILKYMIST_MINIMAC2)
+typedef struct MilkymistMinimac2State MilkymistMinimac2State;
+DECLARE_INSTANCE_CHECKER(MilkymistMinimac2State, MILKYMIST_MINIMAC2,
+ TYPE_MILKYMIST_MINIMAC2)
struct MilkymistMinimac2State {
SysBusDevice parent_obj;
@@ -123,7 +125,6 @@ struct MilkymistMinimac2State {
uint8_t *rx1_buf;
uint8_t *tx_buf;
};
-typedef struct MilkymistMinimac2State MilkymistMinimac2State;
static const uint8_t preamble_sfd[] = {
0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0xd5