summaryrefslogtreecommitdiffstats
path: root/drivers/pci/iov.c
diff options
context:
space:
mode:
authorBjorn Helgaas <bhelgaas@google.com>2012-09-21 10:57:20 -0600
committerBjorn Helgaas <bhelgaas@google.com>2012-09-21 10:57:20 -0600
commit168ae6a08aa6e0cf8b0166dedeb675a20af1fbb7 (patch)
tree31f19d4d3ca748c526e0bb82a670613c6c71ca40 /drivers/pci/iov.c
parent9b9a6d261616bed589302bc6244c5bd7c99a733f (diff)
parent3891b6acb4f443cbe2e99367ee5e67c6bc29d446 (diff)
Merge branch 'pci/yinghai-revert-pci_find_bus-and-remove-cleanup' into next
* pci/yinghai-revert-pci_find_bus-and-remove-cleanup: PCI: Stop all children first, before removing all children Revert "PCI: Use hotplug-safe pci_get_domain_bus_and_slot()"
Diffstat (limited to 'drivers/pci/iov.c')
-rw-r--r--drivers/pci/iov.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/pci/iov.c b/drivers/pci/iov.c
index b0fe7712b4d..aeccc911abb 100644
--- a/drivers/pci/iov.c
+++ b/drivers/pci/iov.c
@@ -152,11 +152,15 @@ failed1:
static void virtfn_remove(struct pci_dev *dev, int id, int reset)
{
char buf[VIRTFN_ID_LEN];
+ struct pci_bus *bus;
struct pci_dev *virtfn;
struct pci_sriov *iov = dev->sriov;
- virtfn = pci_get_domain_bus_and_slot(pci_domain_nr(dev->bus),
- virtfn_bus(dev, id), virtfn_devfn(dev, id));
+ bus = pci_find_bus(pci_domain_nr(dev->bus), virtfn_bus(dev, id));
+ if (!bus)
+ return;
+
+ virtfn = pci_get_slot(bus, virtfn_devfn(dev, id));
if (!virtfn)
return;