From patchwork Sat Feb 16 10:27:26 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Andreas_F=C3=A4rber?= X-Patchwork-Id: 220956 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 287862C0099 for ; Sat, 16 Feb 2013 21:27:56 +1100 (EST) Received: from localhost ([::1]:58892 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U6ezp-0007en-Q3 for incoming@patchwork.ozlabs.org; Sat, 16 Feb 2013 05:27:53 -0500 Received: from eggs.gnu.org ([208.118.235.92]:54647) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U6ezd-0007eW-7D for qemu-devel@nongnu.org; Sat, 16 Feb 2013 05:27:43 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U6ezc-0002JU-4y for qemu-devel@nongnu.org; Sat, 16 Feb 2013 05:27:41 -0500 Received: from cantor2.suse.de ([195.135.220.15]:60066 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U6ezb-0002JH-VK for qemu-devel@nongnu.org; Sat, 16 Feb 2013 05:27:40 -0500 Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id C339BA3A4A; Sat, 16 Feb 2013 11:27:38 +0100 (CET) From: =?UTF-8?q?Andreas=20F=C3=A4rber?= To: qemu-devel@nongnu.org Date: Sat, 16 Feb 2013 11:27:26 +0100 Message-Id: <1361010446-1427-1-git-send-email-afaerber@suse.de> X-Mailer: git-send-email 1.7.10.4 MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x X-Received-From: 195.135.220.15 Cc: =?UTF-8?q?Andreas=20F=C3=A4rber?= , anthony@codemonkey.ws Subject: [Qemu-devel] [PATCH RESEND] isa: Split off instance_init for ISADevice X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Prepares for assigning IRQs before QOM realize. Signed-off-by: Andreas Färber --- hw/isa-bus.c | 12 +++++++++--- 1 Datei geändert, 9 Zeilen hinzugefügt(+), 3 Zeilen entfernt(-) diff --git a/hw/isa-bus.c b/hw/isa-bus.c index fce311b..6dc34f0 100644 --- a/hw/isa-bus.c +++ b/hw/isa-bus.c @@ -124,9 +124,6 @@ static int isa_qdev_init(DeviceState *qdev) ISADevice *dev = ISA_DEVICE(qdev); ISADeviceClass *klass = ISA_DEVICE_GET_CLASS(dev); - dev->isairq[0] = -1; - dev->isairq[1] = -1; - if (klass->init) { return klass->init(dev); } @@ -134,6 +131,14 @@ static int isa_qdev_init(DeviceState *qdev) return 0; } +static void isa_device_init(Object *obj) +{ + ISADevice *dev = ISA_DEVICE(obj); + + dev->isairq[0] = -1; + dev->isairq[1] = -1; +} + ISADevice *isa_create(ISABus *bus, const char *name) { DeviceState *dev; @@ -233,6 +238,7 @@ static const TypeInfo isa_device_type_info = { .name = TYPE_ISA_DEVICE, .parent = TYPE_DEVICE, .instance_size = sizeof(ISADevice), + .instance_init = isa_device_init, .abstract = true, .class_size = sizeof(ISADeviceClass), .class_init = isa_device_class_init,