From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:60757) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QYaA5-0005Os-Ld for qemu-devel@nongnu.org; Mon, 20 Jun 2011 04:48:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QYaA4-0002nz-3c for qemu-devel@nongnu.org; Mon, 20 Jun 2011 04:48:49 -0400 Received: from mx1.redhat.com ([209.132.183.28]:61892) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QYaA3-0002nt-N2 for qemu-devel@nongnu.org; Mon, 20 Jun 2011 04:48:47 -0400 Date: Mon, 20 Jun 2011 11:48:56 +0300 From: "Michael S. Tsirkin" Message-ID: <20110620084856.GB22456@redhat.com> References: <1308240319-13949-2-git-send-email-stefano.stabellini@eu.citrix.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1308240319-13949-2-git-send-email-stefano.stabellini@eu.citrix.com> Subject: Re: [Qemu-devel] [PATCH 2/3] pci: export pci_unplug_device List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: stefano.stabellini@eu.citrix.com Cc: Anthony.Perard@citrix.com, xen-devel@lists.xensource.com, qemu-devel@nongnu.org, agraf@suse.de On Thu, Jun 16, 2011 at 05:05:18PM +0100, stefano.stabellini@eu.citrix.com wrote: > From: Stefano Stabellini > > pci_unplug_device is needed by the xen_platform device to perfom dynamic > nic unplug. > > Signed-off-by: Stefano Stabellini I think it's better to go through qdev, pci_unplug_device was intended as an internal API. > --- > hw/pci.c | 2 +- > hw/pci.h | 1 + > 2 files changed, 2 insertions(+), 1 deletions(-) > > diff --git a/hw/pci.c b/hw/pci.c > index 1d297d6..679e976 100644 > --- a/hw/pci.c > +++ b/hw/pci.c > @@ -1692,7 +1692,7 @@ static int pci_qdev_init(DeviceState *qdev, DeviceInfo *base) > return 0; > } > > -static int pci_unplug_device(DeviceState *qdev) > +int pci_unplug_device(DeviceState *qdev) > { > PCIDevice *dev = DO_UPCAST(PCIDevice, qdev, qdev); > PCIDeviceInfo *info = container_of(qdev->info, PCIDeviceInfo, qdev); > diff --git a/hw/pci.h b/hw/pci.h > index 0d288ce..868f793 100644 > --- a/hw/pci.h > +++ b/hw/pci.h > @@ -452,6 +452,7 @@ typedef struct { > > void pci_qdev_register(PCIDeviceInfo *info); > void pci_qdev_register_many(PCIDeviceInfo *info); > +int pci_unplug_device(DeviceState *qdev); > > PCIDevice *pci_create_multifunction(PCIBus *bus, int devfn, bool multifunction, > const char *name); > -- > 1.7.2.3 >