aboutsummaryrefslogtreecommitdiff
path: root/hw/musicpal.c
diff options
context:
space:
mode:
authorAvi Kivity <avi@redhat.com>2011-11-14 12:59:29 +0200
committerAvi Kivity <avi@redhat.com>2011-11-24 18:32:01 +0200
commit4f5c947982137fb235b08b60f63e286ae5680be8 (patch)
tree8550511583b7102af3c26a3d26f779ef73ca5f2a /hw/musicpal.c
parentcffac71b7cc30cc510a5644a7436e6a49e1ecb46 (diff)
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 <avi@redhat.com>
Diffstat (limited to 'hw/musicpal.c')
-rw-r--r--hw/musicpal.c4
1 files changed, 3 insertions, 1 deletions
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;