diff options
| author | Gerd Hoffmann <kraxel@redhat.com> | 2009-09-25 21:42:38 +0200 |
|---|---|---|
| committer | Anthony Liguori <aliguori@us.ibm.com> | 2009-10-05 09:32:48 -0500 |
| commit | e3936fa574d9fbe241acdc76b5195b048567537e (patch) | |
| tree | 51832bf75d2c7677e08e833ce71921cde22ccb9b /hw/pci.c | |
| parent | a36a344dcd5c778cc0417df36c5aa8f95c5497c3 (diff) | |
| download | focaccia-qemu-e3936fa574d9fbe241acdc76b5195b048567537e.tar.gz focaccia-qemu-e3936fa574d9fbe241acdc76b5195b048567537e.zip | |
pci: move unregister from PCIDevice to PCIDeviceInfo
One more cleanup while being at it ;) Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw/pci.c')
| -rw-r--r-- | hw/pci.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/hw/pci.c b/hw/pci.c index 0c7d7ec485..94b65d2e31 100644 --- a/hw/pci.c +++ b/hw/pci.c @@ -26,6 +26,7 @@ #include "monitor.h" #include "net.h" #include "sysemu.h" +#include "msix.h" //#define DEBUG_PCI #ifdef DEBUG_PCI @@ -402,13 +403,15 @@ static void pci_unregister_io_regions(PCIDevice *pci_dev) static int pci_unregister_device(DeviceState *dev) { PCIDevice *pci_dev = DO_UPCAST(PCIDevice, qdev, dev); + PCIDeviceInfo *info = DO_UPCAST(PCIDeviceInfo, qdev, dev->info); int ret = 0; - if (pci_dev->unregister) - ret = pci_dev->unregister(pci_dev); + if (info->exit) + ret = info->exit(pci_dev); if (ret) return ret; + msix_uninit(pci_dev); pci_unregister_io_regions(pci_dev); qemu_free_irqs(pci_dev->irq); |