From 4f5c947982137fb235b08b60f63e286ae5680be8 Mon Sep 17 00:00:00 2001 From: Avi Kivity Date: Mon, 14 Nov 2011 12:59:29 +0200 Subject: musicpal: avoid call to sysbus_init_mmio() Instead of calling sysbus_init_mmio() with a null region, create a dummy region using the memory API. Signed-off-by: Avi Kivity --- hw/musicpal.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/musicpal.c b/hw/musicpal.c index 20553b525b..23acc1df64 100644 --- a/hw/musicpal.c +++ b/hw/musicpal.c @@ -1315,6 +1315,7 @@ static SysBusDeviceInfo musicpal_gpio_info = { typedef struct musicpal_key_state { SysBusDevice busdev; + MemoryRegion iomem; uint32_t kbd_extended; uint32_t pressed_keys; qemu_irq out[8]; @@ -1401,7 +1402,8 @@ static int musicpal_key_init(SysBusDevice *dev) { musicpal_key_state *s = FROM_SYSBUS(musicpal_key_state, dev); - sysbus_init_mmio(dev, 0x0, 0); + memory_region_init(&s->iomem, "dummy", 0); + sysbus_init_mmio_region(dev, &s->iomem); s->kbd_extended = 0; s->pressed_keys = 0; -- cgit v1.2.3