diff options
author | Andreas Färber <afaerber@suse.de> | 2013-07-27 15:50:02 +0200 |
---|---|---|
committer | Andreas Färber <afaerber@suse.de> | 2013-07-29 21:07:02 +0200 |
commit | 436033290065be765363ad73f9437821e0c35084 (patch) | |
tree | 99a4fe0c439b5a3b934c4172f949a5565ed2bd0a /hw/i2c | |
parent | 339104fe3430d19bd1932077bae839cdcc9f7cd2 (diff) | |
download | hqemu-436033290065be765363ad73f9437821e0c35084.zip hqemu-436033290065be765363ad73f9437821e0c35084.tar.gz |
exynos4210_i2c: QOM cast cleanup
Fix one ->qdev access and rename parent field.
Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'hw/i2c')
-rw-r--r-- | hw/i2c/exynos4210_i2c.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/hw/i2c/exynos4210_i2c.c b/hw/i2c/exynos4210_i2c.c index 42f5e89..ce5f849 100644 --- a/hw/i2c/exynos4210_i2c.c +++ b/hw/i2c/exynos4210_i2c.c @@ -80,7 +80,8 @@ static const char *exynos4_i2c_get_regname(unsigned offset) #endif typedef struct Exynos4210I2CState { - SysBusDevice busdev; + SysBusDevice parent_obj; + MemoryRegion iomem; i2c_bus *bus; qemu_irq irq; @@ -297,15 +298,16 @@ static void exynos4210_i2c_reset(DeviceState *d) s->scl_free = true; } -static int exynos4210_i2c_realize(SysBusDevice *dev) +static int exynos4210_i2c_realize(SysBusDevice *sbd) { + DeviceState *dev = DEVICE(sbd); Exynos4210I2CState *s = EXYNOS4_I2C(dev); memory_region_init_io(&s->iomem, OBJECT(s), &exynos4210_i2c_ops, s, TYPE_EXYNOS4_I2C, EXYNOS4_I2C_MEM_SIZE); - sysbus_init_mmio(dev, &s->iomem); - sysbus_init_irq(dev, &s->irq); - s->bus = i2c_init_bus(&dev->qdev, "i2c"); + sysbus_init_mmio(sbd, &s->iomem); + sysbus_init_irq(sbd, &s->irq); + s->bus = i2c_init_bus(dev, "i2c"); return 0; } |