From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:60990) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UGGMs-0001Dg-KU for qemu-devel@nongnu.org; Thu, 14 Mar 2013 18:11:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UGGMr-0004oK-Er for qemu-devel@nongnu.org; Thu, 14 Mar 2013 18:11:22 -0400 Received: from smtp1-g21.free.fr ([2a01:e0c:1:1599::10]:38634) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UGGMq-0004nj-PC for qemu-devel@nongnu.org; Thu, 14 Mar 2013 18:11:21 -0400 From: =?UTF-8?q?Herv=C3=A9=20Poussineau?= Date: Thu, 14 Mar 2013 23:12:05 +0100 Message-Id: <1363299128-8494-5-git-send-email-hpoussin@reactos.org> In-Reply-To: <1363299128-8494-1-git-send-email-hpoussin@reactos.org> References: <1363299128-8494-1-git-send-email-hpoussin@reactos.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [RFC 4/6] m48t59: move ISA ports registration to QOM constructor List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Andreas=20F=C3=A4rber?= , =?UTF-8?q?Herv=C3=A9=20Poussineau?= -device m48t59 can now be used to create a fully functional nvram, and m48t59_init_isa() becomes a much simpler helper. Signed-off-by: Herv=C3=A9 Poussineau --- hw/m48t59.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/hw/m48t59.c b/hw/m48t59.c index 39a9d80..1093716 100644 --- a/hw/m48t59.c +++ b/hw/m48t59.c @@ -676,11 +676,6 @@ M48t59State *m48t59_init_isa(ISABus *bus, uint32_t i= o_base, uint16_t size, d =3D DO_UPCAST(M48t59ISAState, busdev, dev); s =3D &d->state; =20 - memory_region_init_io(&d->io, &m48t59_io_ops, s, "m48t59", 4); - if (io_base !=3D 0) { - isa_register_ioport(dev, &d->io, io_base); - } - return s; } =20 @@ -703,6 +698,10 @@ static int m48t59_init_isa1(ISADevice *dev) =20 isa_init_irq(dev, &s->IRQ, 8); m48t59_init_common(s); + memory_region_init_io(&d->io, &m48t59_io_ops, s, "m48t59", 4); + if (s->io_base !=3D 0) { + isa_register_ioport(dev, &d->io, s->io_base); + } =20 return 0; } --=20 1.7.10.4