Received: from eggs.gnu.org ([2001:4830:134:3::10]:56691) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a9snc-0002So-63 for qemu-devel@nongnu.org; Fri, 18 Dec 2015 06:02:17 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a9sna-00048a-Ta for qemu-devel@nongnu.org; Fri, 18 Dec 2015 06:02:12 -0500 Received: from [59.151.112.132] (port=37291 helo=heian.cn.fujitsu.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a9sna-00047i-H4 for qemu-devel@nongnu.org; Fri, 18 Dec 2015 06:02:10 -0500 From: Cao jin Date: Fri, 18 Dec 2015 19:03:48 +0800 Message-ID: <1450436632-23980-2-git-send-email-caoj.fnst@cn.fujitsu.com> In-Reply-To: <1450436632-23980-1-git-send-email-caoj.fnst@cn.fujitsu.com> References: <1450436632-23980-1-git-send-email-caoj.fnst@cn.fujitsu.com> MIME-Version: 1.0 Content-Type: text/plain Subject: [Qemu-devel] [PATCH 1/5] SH PCI Host: convert to realize() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: ehabkost@redhat.com, mst@redhat.com, pbonzini@redhat.com, leon.alrae@imgtec.com, aurelien@aurel32.net, rth@twiddle.net Signed-off-by: Cao jin --- hw/sh4/sh_pci.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/hw/sh4/sh_pci.c b/hw/sh4/sh_pci.c index a2f6d9e..4509053 100644 --- a/hw/sh4/sh_pci.c +++ b/hw/sh4/sh_pci.c @@ -151,12 +151,11 @@ static int sh_pci_device_init(SysBusDevice *dev) return 0; } -static int sh_pci_host_init(PCIDevice *d) +static void sh_pci_host_realize(PCIDevice *d, Error **errp) { pci_set_word(d->config + PCI_COMMAND, PCI_COMMAND_WAIT); pci_set_word(d->config + PCI_STATUS, PCI_STATUS_CAP_LIST | PCI_STATUS_FAST_BACK | PCI_STATUS_DEVSEL_MEDIUM); - return 0; } static void sh_pci_host_class_init(ObjectClass *klass, void *data) @@ -164,7 +163,7 @@ static void sh_pci_host_class_init(ObjectClass *klass, void *data) PCIDeviceClass *k = PCI_DEVICE_CLASS(klass); DeviceClass *dc = DEVICE_CLASS(klass); - k->init = sh_pci_host_init; + k->realize = sh_pci_host_realize; k->vendor_id = PCI_VENDOR_ID_HITACHI; k->device_id = PCI_DEVICE_ID_HITACHI_SH7751R; /* -- 2.1.0