aboutsummaryrefslogtreecommitdiff
path: root/hw/intc/openpic.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/intc/openpic.c')
-rw-r--r--hw/intc/openpic.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/hw/intc/openpic.c b/hw/intc/openpic.c
index b9e025f..937e292 100644
--- a/hw/intc/openpic.c
+++ b/hw/intc/openpic.c
@@ -1516,8 +1516,8 @@ static void map_list(OpenPICState *opp, const MemReg *list, int *count)
while (list->name) {
assert(*count < ARRAY_SIZE(opp->sub_io_mem));
- memory_region_init_io(&opp->sub_io_mem[*count], NULL, list->ops, opp,
- list->name, list->size);
+ memory_region_init_io(&opp->sub_io_mem[*count], OBJECT(opp), list->ops,
+ opp, list->name, list->size);
memory_region_add_subregion(&opp->mem, list->start_addr,
&opp->sub_io_mem[*count]);
@@ -1531,7 +1531,7 @@ static void openpic_init(Object *obj)
{
OpenPICState *opp = OPENPIC(obj);
- memory_region_init(&opp->mem, NULL, "openpic", 0x40000);
+ memory_region_init(&opp->mem, obj, "openpic", 0x40000);
}
static void openpic_realize(DeviceState *dev, Error **errp)