diff options
author | Andreas Färber <afaerber@suse.de> | 2013-08-01 18:51:35 +0200 |
---|---|---|
committer | Andreas Färber <afaerber@suse.de> | 2014-02-14 21:07:20 +0100 |
commit | 08c9cacf0e965562cbf5bf44067b0bd4863e250f (patch) | |
tree | bc022889f31ccf9bd934dc0582dbfcbe2a2f11a2 /hw/char/ipoctal232.c | |
parent | 227d32725216723ffa99f0eb43c97f933e1da5b4 (diff) |
ipoctal232: QOM parent field cleanup
Clean up accesses to IPOctalState::dev field and rename it.
Acked-by: Alberto Garcia <agarcia@igalia.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'hw/char/ipoctal232.c')
-rw-r--r-- | hw/char/ipoctal232.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/hw/char/ipoctal232.c b/hw/char/ipoctal232.c index b33cfff6e8..99bab4dd83 100644 --- a/hw/char/ipoctal232.c +++ b/hw/char/ipoctal232.c @@ -108,7 +108,8 @@ struct SCC2698Block { }; struct IPOctalState { - IPackDevice dev; + IPackDevice parent_obj; + SCC2698Channel ch[N_CHANNELS]; SCC2698Block blk[N_BLOCKS]; uint8_t irq_vector; @@ -154,7 +155,7 @@ static const VMStateDescription vmstate_ipoctal = { .minimum_version_id = 1, .minimum_version_id_old = 1, .fields = (VMStateField[]) { - VMSTATE_IPACK_DEVICE(dev, IPOctalState), + VMSTATE_IPACK_DEVICE(parent_obj, IPOctalState), VMSTATE_STRUCT_ARRAY(ch, IPOctalState, N_CHANNELS, 1, vmstate_scc2698_channel, SCC2698Channel), VMSTATE_STRUCT_ARRAY(blk, IPOctalState, N_BLOCKS, 1, @@ -172,6 +173,7 @@ static const uint8_t id_prom_data[] = { static void update_irq(IPOctalState *dev, unsigned block) { + IPackDevice *idev = IPACK_DEVICE(dev); /* Blocks A and B interrupt on INT0#, C and D on INT1#. Thus, to get the status we have to check two blocks. */ SCC2698Block *blk0 = &dev->blk[block]; @@ -179,9 +181,9 @@ static void update_irq(IPOctalState *dev, unsigned block) unsigned intno = block / 2; if ((blk0->isr & blk0->imr) || (blk1->isr & blk1->imr)) { - qemu_irq_raise(dev->dev.irq[intno]); + qemu_irq_raise(idev->irq[intno]); } else { - qemu_irq_lower(dev->dev.irq[intno]); + qemu_irq_lower(idev->irq[intno]); } } |