From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50260) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V5Mis-0000Lz-8w for qemu-devel@nongnu.org; Fri, 02 Aug 2013 17:17:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V5Mim-0007hh-1x for qemu-devel@nongnu.org; Fri, 02 Aug 2013 17:17:18 -0400 Received: from cantor2.suse.de ([195.135.220.15]:33280 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V5Mil-0007hS-Pk for qemu-devel@nongnu.org; Fri, 02 Aug 2013 17:17:11 -0400 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Fri, 2 Aug 2013 23:17:00 +0200 Message-Id: <1375478221-22722-6-git-send-email-afaerber@suse.de> In-Reply-To: <1375478221-22722-1-git-send-email-afaerber@suse.de> References: <1375478221-22722-1-git-send-email-afaerber@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PATCH qom-next for-next 5/6] ipoctal232: QOM parent field cleanup List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Alberto Garcia , =?UTF-8?q?Andreas=20F=C3=A4rber?= Clean up accesses to IPOctalState::dev field and rename it. Signed-off-by: Andreas F=C3=A4rber --- 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 { }; =20 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[] =3D { =20 static void update_irq(IPOctalState *dev, unsigned block) { + IPackDevice *idev =3D 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 =3D &dev->blk[block]; @@ -181,9 +183,9 @@ static void update_irq(IPOctalState *dev, unsigned bl= ock) unsigned intno =3D block / 2; =20 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]); } } =20 --=20 1.8.1.4