summaryrefslogtreecommitdiff
path: root/hw/net/lan9118.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/net/lan9118.c')
-rw-r--r--hw/net/lan9118.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/net/lan9118.c b/hw/net/lan9118.c
index ce68399116..3323f48d97 100644
--- a/hw/net/lan9118.c
+++ b/hw/net/lan9118.c
@@ -1328,7 +1328,8 @@ static int lan9118_init1(SysBusDevice *dev)
const MemoryRegionOps *mem_ops =
s->mode_16bit ? &lan9118_16bit_mem_ops : &lan9118_mem_ops;
- memory_region_init_io(&s->mmio, NULL, mem_ops, s, "lan9118-mmio", 0x100);
+ memory_region_init_io(&s->mmio, OBJECT(dev), mem_ops, s,
+ "lan9118-mmio", 0x100);
sysbus_init_mmio(dev, &s->mmio);
sysbus_init_irq(dev, &s->irq);
qemu_macaddr_default_if_unset(&s->conf.macaddr);