memory: add opaque parameter to memory_region_init_rom_device()

The MemoryRegionOps callbacks expect it.

Signed-off-by: Avi Kivity <avi@redhat.com>
This commit is contained in:
Avi Kivity 2011-08-26 00:35:15 +03:00
parent 7bc2b9cd4d
commit 75f5941cb5
2 changed files with 3 additions and 0 deletions

View File

@ -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);

View File

@ -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);