From db10ca9057b11222408f708d5d99a3888eca4feb Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Thu, 6 Jun 2013 21:19:53 -0400 Subject: piolist: add owner argument to initialization functions and pass devices Signed-off-by: Paolo Bonzini --- ioport.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'ioport.c') diff --git a/ioport.c b/ioport.c index 3a6a73dd98..79b7f1ae38 100644 --- a/ioport.c +++ b/ioport.c @@ -106,6 +106,7 @@ uint32_t cpu_inl(pio_addr_t addr) } void portio_list_init(PortioList *piolist, + Object *owner, const MemoryRegionPortio *callbacks, void *opaque, const char *name) { @@ -120,6 +121,7 @@ void portio_list_init(PortioList *piolist, piolist->regions = g_new0(MemoryRegion *, n); piolist->address_space = NULL; piolist->opaque = opaque; + piolist->owner = owner; piolist->name = name; } @@ -211,8 +213,8 @@ static void portio_list_add_1(PortioList *piolist, * Use an alias so that the callback is called with an absolute address, * rather than an offset relative to to start + off_low. */ - memory_region_init_io(&mrpio->mr, NULL, &portio_ops, mrpio, piolist->name, - off_high - off_low); + memory_region_init_io(&mrpio->mr, piolist->owner, &portio_ops, mrpio, + piolist->name, off_high - off_low); memory_region_add_subregion(piolist->address_space, start + off_low, &mrpio->mr); piolist->regions[piolist->nr] = &mrpio->mr; -- cgit v1.2.1