aboutsummaryrefslogtreecommitdiff
path: root/hw/ppc
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2014-06-11 12:42:01 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2014-08-18 12:06:20 +0200
commitd8d95814609e89e5438a3318a647ec322fc4ff16 (patch)
treea3f5cd4ff75d6488f0b00968cd7ed5c3a8df2c0b /hw/ppc
parente3fb0ade83420a86464ee50c71f2daf5641cab10 (diff)
downloadqemu-d8d95814609e89e5438a3318a647ec322fc4ff16.zip
qemu-d8d95814609e89e5438a3318a647ec322fc4ff16.tar.gz
qemu-d8d95814609e89e5438a3318a647ec322fc4ff16.tar.bz2
memory: convert memory_region_destroy to object_unparent
Explicitly call object_unparent in the few places where we will re-create the memory region. If the memory region is simply being destroyed as part of device teardown, let QOM handle it. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/ppc')
-rw-r--r--hw/ppc/ppc4xx_devs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/ppc/ppc4xx_devs.c b/hw/ppc/ppc4xx_devs.c
index 07f9d00..405bbe7 100644
--- a/hw/ppc/ppc4xx_devs.c
+++ b/hw/ppc/ppc4xx_devs.c
@@ -422,7 +422,7 @@ static void sdram_set_bcr(ppc4xx_sdram_t *sdram,
&sdram->containers[n]);
memory_region_del_subregion(&sdram->containers[n],
&sdram->ram_memories[n]);
- memory_region_destroy(&sdram->containers[n]);
+ object_unparent(OBJECT(&sdram->containers[n]));
}
*bcrp = bcr & 0xFFDEE001;
if (enabled && (bcr & 0x00000001)) {