From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56422) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a9zJI-0001UV-4V for qemu-devel@nongnu.org; Fri, 18 Dec 2015 12:59:20 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a9zJE-0001Cf-5l for qemu-devel@nongnu.org; Fri, 18 Dec 2015 12:59:20 -0500 References: <1450436632-23980-1-git-send-email-caoj.fnst@cn.fujitsu.com> <1450436632-23980-2-git-send-email-caoj.fnst@cn.fujitsu.com> From: Paolo Bonzini Message-ID: <5674496F.4000503@redhat.com> Date: Fri, 18 Dec 2015 18:59:11 +0100 MIME-Version: 1.0 In-Reply-To: <1450436632-23980-2-git-send-email-caoj.fnst@cn.fujitsu.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 1/5] SH PCI Host: convert to realize() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Cao jin , qemu-devel@nongnu.org Cc: ehabkost@redhat.com, mst@redhat.com, qemu-trivial@nongnu.org, leon.alrae@imgtec.com, aurelien@aurel32.net, rth@twiddle.net Cc: qemu-trivial@nongnu.org On 18/12/2015 12:03, Cao jin wrote: > 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; > /* >