mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-08 02:03:56 -06:00
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>
This commit is contained in:
parent
e3fb0ade83
commit
d8d9581460
9 changed files with 18 additions and 14 deletions
|
@ -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)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue