aboutsummaryrefslogtreecommitdiff
path: root/memory.c
diff options
context:
space:
mode:
authorPavel Fedin <p.fedin@samsung.com>2015-08-13 11:26:21 +0100
committerPeter Maydell <peter.maydell@linaro.org>2015-08-13 11:26:21 +0100
commit6d6d2abf2c2e52c0f404d0a31a963e945b0cc7ad (patch)
tree1c24b202920104e306c83dc33539c4a08974a1f4 /memory.c
parent68b85290c7e23cfa159e1a5058d959814c6fa289 (diff)
downloadqemu-arm-6d6d2abf2c2e52c0f404d0a31a963e945b0cc7ad.tar.gz
Merge memory_region_init_reservation() into memory_region_init_io()
Just specifying ops = NULL in some cases can be more convenient than having two functions. Signed-off-by: Pavel Fedin <p.fedin@samsung.com> Acked-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 78a379ab1b6b30ab497db7971ad336dad1dbee76.1438758065.git.p.fedin@samsung.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'memory.c')
-rw-r--r--memory.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/memory.c b/memory.c
index 4eb138a429..0d8b2d96a9 100644
--- a/memory.c
+++ b/memory.c
@@ -1182,7 +1182,7 @@ void memory_region_init_io(MemoryRegion *mr,
uint64_t size)
{
memory_region_init(mr, owner, name, size);
- mr->ops = ops;
+ mr->ops = ops ? ops : &unassigned_mem_ops;
mr->opaque = opaque;
mr->terminates = true;
}
@@ -1300,14 +1300,6 @@ void memory_region_init_iommu(MemoryRegion *mr,
notifier_list_init(&mr->iommu_notify);
}
-void memory_region_init_reservation(MemoryRegion *mr,
- Object *owner,
- const char *name,
- uint64_t size)
-{
- memory_region_init_io(mr, owner, &unassigned_mem_ops, mr, name, size);
-}
-
static void memory_region_finalize(Object *obj)
{
MemoryRegion *mr = MEMORY_REGION(obj);