From patchwork Fri Sep 28 13:50:01 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?C=C3=A9dric_Le_Goater?= X-Patchwork-Id: 976319 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=kaod.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42MCwr1V9Tz9s3Z for ; Fri, 28 Sep 2018 23:59:56 +1000 (AEST) Received: from localhost ([::1]:43556 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g5tJB-0004JW-Rx for incoming@patchwork.ozlabs.org; Fri, 28 Sep 2018 09:59:53 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56033) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g5tAc-0004r3-C9 for qemu-devel@nongnu.org; Fri, 28 Sep 2018 09:51:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g5tAY-00078l-9Q for qemu-devel@nongnu.org; Fri, 28 Sep 2018 09:51:02 -0400 Received: from 9.mo68.mail-out.ovh.net ([46.105.78.111]:60049) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1g5tAY-00078J-3H for qemu-devel@nongnu.org; Fri, 28 Sep 2018 09:50:58 -0400 Received: from player691.ha.ovh.net (unknown [10.109.143.18]) by mo68.mail-out.ovh.net (Postfix) with ESMTP id 56632FDFB1 for ; Fri, 28 Sep 2018 15:50:56 +0200 (CEST) Received: from zorba.kaod.org.com (LFbn-1-10605-110.w90-89.abo.wanadoo.fr [90.89.196.110]) (Authenticated sender: clg@kaod.org) by player691.ha.ovh.net (Postfix) with ESMTPSA id 0B4ED26008E; Fri, 28 Sep 2018 15:50:51 +0200 (CEST) From: =?utf-8?q?C=C3=A9dric_Le_Goater?= To: Jason Wang , qemu-devel@nongnu.org Date: Fri, 28 Sep 2018 15:50:01 +0200 Message-Id: <20180928135003.8650-10-clg@kaod.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180928135003.8650-1-clg@kaod.org> References: <20180928135003.8650-1-clg@kaod.org> MIME-Version: 1.0 X-Ovh-Tracer-Id: 3584865303964847103 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtjedruddtledgjedtucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucesvcftvggtihhpihgvnhhtshculddquddttddm X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 46.105.78.111 Subject: [Qemu-devel] [PATCH 09/11] net: stellaris_enet: convert SysBus init method to a realize method 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: Peter Maydell , qemu-arm@nongnu.org, =?utf-8?q?C=C3=A9dric_Le_Goater?= Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Cc: Peter Maydell Cc: qemu-arm@nongnu.org Signed-off-by: Cédric Le Goater Reviewed-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daudé --- hw/net/stellaris_enet.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/hw/net/stellaris_enet.c b/hw/net/stellaris_enet.c index 165562d7886a..3ee1e0f8a43f 100644 --- a/hw/net/stellaris_enet.c +++ b/hw/net/stellaris_enet.c @@ -473,9 +473,9 @@ static NetClientInfo net_stellaris_enet_info = { .receive = stellaris_enet_receive, }; -static int stellaris_enet_init(SysBusDevice *sbd) +static void stellaris_enet_realize(DeviceState *dev, Error **errp) { - DeviceState *dev = DEVICE(sbd); + SysBusDevice *sbd = SYS_BUS_DEVICE(dev); stellaris_enet_state *s = STELLARIS_ENET(dev); memory_region_init_io(&s->mmio, OBJECT(s), &stellaris_enet_ops, s, @@ -489,7 +489,6 @@ static int stellaris_enet_init(SysBusDevice *sbd) qemu_format_nic_info_str(qemu_get_queue(s->nic), s->conf.macaddr.a); stellaris_enet_reset(s); - return 0; } static Property stellaris_enet_properties[] = { @@ -500,9 +499,8 @@ static Property stellaris_enet_properties[] = { static void stellaris_enet_class_init(ObjectClass *klass, void *data) { DeviceClass *dc = DEVICE_CLASS(klass); - SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass); - k->init = stellaris_enet_init; + dc->realize = stellaris_enet_realize; dc->props = stellaris_enet_properties; dc->vmsd = &vmstate_stellaris_enet; }