aboutsummaryrefslogtreecommitdiff
path: root/hw/net/mipsnet.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/net/mipsnet.c')
-rw-r--r--hw/net/mipsnet.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/hw/net/mipsnet.c b/hw/net/mipsnet.c
index 0c578c430c..61dbd575da 100644
--- a/hw/net/mipsnet.c
+++ b/hw/net/mipsnet.c
@@ -6,6 +6,7 @@
#include "trace.h"
#include "hw/sysbus.h"
#include "migration/vmstate.h"
+#include "qom/object.h"
/* MIPSnet register offsets */
@@ -24,9 +25,11 @@
#define MAX_ETH_FRAME_SIZE 1514
#define TYPE_MIPS_NET "mipsnet"
-#define MIPS_NET(obj) OBJECT_CHECK(MIPSnetState, (obj), TYPE_MIPS_NET)
+typedef struct MIPSnetState MIPSnetState;
+DECLARE_INSTANCE_CHECKER(MIPSnetState, MIPS_NET,
+ TYPE_MIPS_NET)
-typedef struct MIPSnetState {
+struct MIPSnetState {
SysBusDevice parent_obj;
uint32_t busy;
@@ -41,7 +44,7 @@ typedef struct MIPSnetState {
qemu_irq irq;
NICState *nic;
NICConf conf;
-} MIPSnetState;
+};
static void mipsnet_reset(MIPSnetState *s)
{