memory: add opaque parameter to memory_region_init_rom_device()
authorAvi Kivity <avi@redhat.com>
Thu, 25 Aug 2011 21:35:15 +0000 (00:35 +0300)
committerAvi Kivity <avi@redhat.com>
Thu, 25 Aug 2011 21:35:15 +0000 (00:35 +0300)
The MemoryRegionOps callbacks expect it.

Signed-off-by: Avi Kivity <avi@redhat.com>
memory.c
memory.h

index b91c5da7b5b8a2aac2800ac23b34908e410a9f57..1491a396ec9b5f623b2f556c87764f207c03af3c 100644 (file)
--- a/memory.c
+++ b/memory.c
@@ -962,12 +962,14 @@ void memory_region_init_alias(MemoryRegion *mr,
 
 void memory_region_init_rom_device(MemoryRegion *mr,
                                    const MemoryRegionOps *ops,
+                                   void *opaque,
                                    DeviceState *dev,
                                    const char *name,
                                    uint64_t size)
 {
     memory_region_init(mr, name, size);
     mr->ops = ops;
+    mr->opaque = opaque;
     mr->terminates = true;
     mr->destructor = memory_region_destructor_rom_device;
     mr->ram_addr = qemu_ram_alloc(dev, name, size);
index 0553cc7526e47eac69eeac79558ffa59a1d42156..06b83ae76b3ec050f20d6a02b7b262750b42c66e 100644 (file)
--- a/memory.h
+++ b/memory.h
@@ -235,6 +235,7 @@ void memory_region_init_alias(MemoryRegion *mr,
  */
 void memory_region_init_rom_device(MemoryRegion *mr,
                                    const MemoryRegionOps *ops,
+                                   void *opaque,
                                    DeviceState *dev, /* FIXME: layering violation */
                                    const char *name,
                                    uint64_t size);