From patchwork Tue Oct 28 07:35:34 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Markus Armbruster X-Patchwork-Id: 404084 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 952DE140076 for ; Tue, 28 Oct 2014 18:42:27 +1100 (AEDT) Received: from localhost ([::1]:37747 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xj1Q9-0002qm-RQ for incoming@patchwork.ozlabs.org; Tue, 28 Oct 2014 03:42:25 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56080) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xj1Jy-00010J-On for qemu-devel@nongnu.org; Tue, 28 Oct 2014 03:36:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xj1Jr-0008JY-9D for qemu-devel@nongnu.org; Tue, 28 Oct 2014 03:36:02 -0400 Received: from mx1.redhat.com ([209.132.183.28]:59541) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xj1Jr-0008JN-2G for qemu-devel@nongnu.org; Tue, 28 Oct 2014 03:35:55 -0400 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s9S7Zi5V019828 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 28 Oct 2014 03:35:44 -0400 Received: from blackfin.pond.sub.org (ovpn-116-34.ams2.redhat.com [10.36.116.34]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s9S7Zg4R017620 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 28 Oct 2014 03:35:44 -0400 Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 6DDE6305CAB0; Tue, 28 Oct 2014 08:35:39 +0100 (CET) From: Markus Armbruster To: qemu-devel@nongnu.org Date: Tue, 28 Oct 2014 08:35:34 +0100 Message-Id: <1414481739-19939-6-git-send-email-armbru@redhat.com> In-Reply-To: <1414481739-19939-1-git-send-email-armbru@redhat.com> References: <1414481739-19939-1-git-send-email-armbru@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.27 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: pbonzini@redhat.com, arei.gonglei@huawei.com, kraxel@redhat.com, afaerber@suse.de, mst@redhat.com Subject: [Qemu-devel] [PATCH RFC 05/10] pcnet: Convert to realize 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 Signed-off-by: Markus Armbruster --- hw/net/pcnet-pci.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/hw/net/pcnet-pci.c b/hw/net/pcnet-pci.c index 50eb069..e5122a0 100644 --- a/hw/net/pcnet-pci.c +++ b/hw/net/pcnet-pci.c @@ -297,7 +297,7 @@ static NetClientInfo net_pci_pcnet_info = { .cleanup = pci_pcnet_cleanup, }; -static int pci_pcnet_init(PCIDevice *pci_dev) +static void pci_pcnet_realize(PCIDevice *pci_dev, Error **errp) { PCIPCNetState *d = PCI_PCNET(pci_dev); PCNetState *s = &d->state; @@ -336,7 +336,6 @@ static int pci_pcnet_init(PCIDevice *pci_dev) s->dma_opaque = pci_dev; pcnet_common_init(DEVICE(pci_dev), s, &net_pci_pcnet_info); - return 0; } static void pci_reset(DeviceState *dev) @@ -366,7 +365,7 @@ static void pcnet_class_init(ObjectClass *klass, void *data) DeviceClass *dc = DEVICE_CLASS(klass); PCIDeviceClass *k = PCI_DEVICE_CLASS(klass); - k->init = pci_pcnet_init; + k->realize = pci_pcnet_realize; k->exit = pci_pcnet_uninit; k->romfile = "efi-pcnet.rom", k->vendor_id = PCI_VENDOR_ID_AMD;