aboutsummaryrefslogtreecommitdiff
path: root/hw/ide/ahci.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2013-06-06 21:25:08 -0400
committerPaolo Bonzini <pbonzini@redhat.com>2013-07-04 17:42:48 +0200
commit1437c94b2689c2010362f84d14f14feaa1d8dba3 (patch)
treebd4b6f471dd28369663606a2a1831b92787b74d1 /hw/ide/ahci.c
parentb716368778aebdb523546d72a28706420a8c32ae (diff)
hw/i*: pass owner to memory_region_init* functions
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/ide/ahci.c')
-rw-r--r--hw/ide/ahci.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c
index e7734f3b13..97eddec920 100644
--- a/hw/ide/ahci.c
+++ b/hw/ide/ahci.c
@@ -1158,8 +1158,10 @@ void ahci_init(AHCIState *s, DeviceState *qdev, AddressSpace *as, int ports)
s->dev = g_malloc0(sizeof(AHCIDevice) * ports);
ahci_reg_init(s);
/* XXX BAR size should be 1k, but that breaks, so bump it to 4k for now */
- memory_region_init_io(&s->mem, NULL, &ahci_mem_ops, s, "ahci", AHCI_MEM_BAR_SIZE);
- memory_region_init_io(&s->idp, NULL, &ahci_idp_ops, s, "ahci-idp", 32);
+ memory_region_init_io(&s->mem, OBJECT(qdev), &ahci_mem_ops, s,
+ "ahci", AHCI_MEM_BAR_SIZE);
+ memory_region_init_io(&s->idp, OBJECT(qdev), &ahci_idp_ops, s,
+ "ahci-idp", 32);
irqs = qemu_allocate_irqs(ahci_irq_set, s, s->ports);