From 58268c8d3d051f7fe329dcd42a9284cb4e3b3e31 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Wed, 14 Sep 2016 11:05:59 +0200 Subject: memory: remove memory_region_destructor_rom_device It is equivalent to memory_region_destructor_ram, use that one. Reviewed-by: Igor Mammedov Signed-off-by: Paolo Bonzini --- memory.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'memory.c') diff --git a/memory.c b/memory.c index 0eb6895..1a1baf5 100644 --- a/memory.c +++ b/memory.c @@ -944,11 +944,6 @@ static void memory_region_destructor_ram(MemoryRegion *mr) qemu_ram_free(mr->ram_block); } -static void memory_region_destructor_rom_device(MemoryRegion *mr) -{ - qemu_ram_free(mr->ram_block); -} - static bool memory_region_need_escape(char c) { return c == '/' || c == '[' || c == '\\' || c == ']'; @@ -1405,7 +1400,7 @@ void memory_region_init_rom_device(MemoryRegion *mr, mr->opaque = opaque; mr->terminates = true; mr->rom_device = true; - mr->destructor = memory_region_destructor_rom_device; + mr->destructor = memory_region_destructor_ram; mr->ram_block = qemu_ram_alloc(size, mr, errp); } -- cgit v1.1