From cffac71b7cc30cc510a5644a7436e6a49e1ecb46 Mon Sep 17 00:00:00 2001 From: Avi Kivity Date: Mon, 14 Nov 2011 12:59:29 +0200 Subject: bitbang_i2c: 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/bitbang_i2c.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'hw/bitbang_i2c.c') diff --git a/hw/bitbang_i2c.c b/hw/bitbang_i2c.c index 431359d615..71dd5951e9 100644 --- a/hw/bitbang_i2c.c +++ b/hw/bitbang_i2c.c @@ -184,6 +184,7 @@ bitbang_i2c_interface *bitbang_i2c_init(i2c_bus *bus) /* GPIO interface. */ typedef struct { SysBusDevice busdev; + MemoryRegion dummy_iomem; bitbang_i2c_interface *bitbang; int last_level; qemu_irq out; @@ -205,7 +206,8 @@ static int gpio_i2c_init(SysBusDevice *dev) GPIOI2CState *s = FROM_SYSBUS(GPIOI2CState, dev); i2c_bus *bus; - sysbus_init_mmio(dev, 0x0, 0); + memory_region_init(&s->dummy_iomem, "gpio_i2c", 0); + sysbus_init_mmio_region(dev, &s->dummy_iomem); bus = i2c_init_bus(&dev->qdev, "i2c"); s->bitbang = bitbang_i2c_init(bus); -- cgit v1.2.3