qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH qom-next for-next 5/6] ipoctal232: QOM parent field


From: Andreas Färber
Subject: [Qemu-devel] [PATCH qom-next for-next 5/6] ipoctal232: QOM parent field cleanup
Date: Fri, 2 Aug 2013 23:17:00 +0200

Clean up accesses to IPOctalState::dev field and rename it.

Signed-off-by: Andreas Färber <address@hidden>
---
 hw/char/ipoctal232.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/hw/char/ipoctal232.c b/hw/char/ipoctal232.c
index 08093da..4af9678 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;
@@ -174,6 +175,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];
@@ -181,9 +183,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]);
     }
 }
 
-- 
1.8.1.4




reply via email to

[Prev in Thread] Current Thread [Next in Thread]