From nobody Tue Oct 28 04:11:07 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (208.118.235.17 [208.118.235.17]) by mx.zohomail.com with SMTPS id 1514557980638946.8117390100595; Fri, 29 Dec 2017 06:33:00 -0800 (PST) Received: from localhost ([::1]:42831 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eUviB-0001Se-ON for importer@patchew.org; Fri, 29 Dec 2017 09:32:39 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39176) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eUvg4-0000CJ-0w for qemu-devel@nongnu.org; Fri, 29 Dec 2017 09:30:28 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eUvg3-0006EW-5D for qemu-devel@nongnu.org; Fri, 29 Dec 2017 09:30:28 -0500 Received: from iserv.reactos.org ([2a01:4f8:221:4c5::3]:38312) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eUvg2-0006DW-Sc for qemu-devel@nongnu.org; Fri, 29 Dec 2017 09:30:27 -0500 Received: from [2a01:e34:ee6b:9c80:6267:20ff:fe65:a488] (helo=localhost.localdomain) by iserv.reactos.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1eUvfd-0002om-4i; Fri, 29 Dec 2017 14:30:01 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=reactos.org; s=25047; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From; bh=8j+h89g27JelJleioBxdWv/rziYqhF2Fxhmw6Z94AJI=; b=bmLu5byKNSkV9nRgt8NcW/1TzcqUuMHskSj3+GCaJBjwPwmikByGAw037cB4PaXP6X9zC/IZTPgo8+sWAe1lUTgkYHkxB1+b0eES3iPzaEPQQfbVtUTq+z0xIbxqFsZqllVCIKWEK0h8iZn+2trAhyS5tlCVOmXiqcFN0ZC9EvQ=; From: =?UTF-8?q?Herv=C3=A9=20Poussineau?= To: Aurelien Jarno , Yongbok Kim , "Michael S . Tsirkin" , Paolo Bonzini , qemu-devel@nongnu.org Date: Fri, 29 Dec 2017 15:29:20 +0100 Message-Id: <20171229142922.31701-15-hpoussin@reactos.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20171229142922.31701-1-hpoussin@reactos.org> References: <20171229142922.31701-1-hpoussin@reactos.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a01:4f8:221:4c5::3 Subject: [Qemu-devel] [PATCH v3 14/16] piix4: convert reset function to QOM X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Herv=C3=A9=20Poussineau?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Signed-off-by: Herv=C3=A9 Poussineau --- hw/isa/piix4.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/isa/piix4.c b/hw/isa/piix4.c index 64526e1bb8..c6691a6914 100644 --- a/hw/isa/piix4.c +++ b/hw/isa/piix4.c @@ -56,10 +56,10 @@ typedef struct PIIX4State { #define PIIX4_PCI_DEVICE(obj) \ OBJECT_CHECK(PIIX4State, (obj), TYPE_PIIX4_PCI_DEVICE) =20 -static void piix4_reset(void *opaque) +static void piix4_reset(DeviceState *dev) { - PIIX4State *d =3D opaque; - uint8_t *pci_conf =3D d->dev.config; + PIIX4State *s =3D PIIX4_PCI_DEVICE(dev); + uint8_t *pci_conf =3D s->dev.config; =20 pci_conf[0x04] =3D 0x07; // master, memory and I/O pci_conf[0x05] =3D 0x00; @@ -230,7 +230,6 @@ static void piix4_realize(PCIDevice *pci, Error **errp) isa_init_irq(ISA_DEVICE(&s->rtc), &s->rtc.irq, RTC_ISA_IRQ); =20 piix4_dev =3D pci; - qemu_register_reset(piix4_reset, s); } =20 static void piix4_init(Object *obj) @@ -264,6 +263,7 @@ static void piix4_class_init(ObjectClass *klass, void *= data) k->vendor_id =3D PCI_VENDOR_ID_INTEL; k->device_id =3D PCI_DEVICE_ID_INTEL_82371AB_0; k->class_id =3D PCI_CLASS_BRIDGE_ISA; + dc->reset =3D piix4_reset; dc->desc =3D "ISA bridge"; dc->vmsd =3D &vmstate_piix4; /* --=20 2.11.0