diff options
author | Bjorn Helgaas <bhelgaas@google.com> | 2012-08-23 20:36:10 -0400 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2012-08-23 20:36:10 -0400 |
commit | 7bf79d8a9904ee1ed354e7e655f8045afda67fd6 (patch) | |
tree | fde1ddd5e0743b9585bef508ff0baf7a8d90288f /drivers/pci/search.c | |
parent | a28afda8cc6a45b2c5a4f98cf8fcddd877597701 (diff) | |
parent | c29aabe22eafb4914aecebab6e99623894d81564 (diff) |
Merge branch 'pci/bjorn-cleanup-remove' into next
* pci/bjorn-cleanup-remove:
PCI: Remove unused pci_dev_b()
sgi-agp: Use list_for_each_entry() for bus->devices traversal
parisc/PCI: Use list_for_each_entry() for bus->devices traversal
parisc/PCI: Enable PERR/SERR on all devices
frv/PCI: Use list_for_each_entry() for bus->devices traversal
PCI: Leave normal LIST_POISON in deleted list entries
PCI: Rename local variables to conventional names
PCI: Remove unused, commented-out, code
PCI: Stop and remove devices in one pass
PCI: Fold stop and remove helpers into their callers
PCI: Use list_for_each_entry() for bus->devices traversal
PCI: Remove pci_stop_and_remove_behind_bridge()
PCI: Don't export stop_bus_device and remove_bus_device interfaces
pcmcia: Use common pci_stop_and_remove_bus_device()
PCI: acpiphp: Use common pci_stop_and_remove_bus_device()
PCI: acpiphp: Stop disabling bridges on remove
Diffstat (limited to 'drivers/pci/search.c')
-rw-r--r-- | drivers/pci/search.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/pci/search.c b/drivers/pci/search.c index 621b162ceb69..d84cdcfaacf3 100644 --- a/drivers/pci/search.c +++ b/drivers/pci/search.c | |||
@@ -130,16 +130,14 @@ pci_find_next_bus(const struct pci_bus *from) | |||
130 | * decrement the reference count by calling pci_dev_put(). | 130 | * decrement the reference count by calling pci_dev_put(). |
131 | * If no device is found, %NULL is returned. | 131 | * If no device is found, %NULL is returned. |
132 | */ | 132 | */ |
133 | struct pci_dev * pci_get_slot(struct pci_bus *bus, unsigned int devfn) | 133 | struct pci_dev *pci_get_slot(struct pci_bus *bus, unsigned int devfn) |
134 | { | 134 | { |
135 | struct list_head *tmp; | ||
136 | struct pci_dev *dev; | 135 | struct pci_dev *dev; |
137 | 136 | ||
138 | WARN_ON(in_interrupt()); | 137 | WARN_ON(in_interrupt()); |
139 | down_read(&pci_bus_sem); | 138 | down_read(&pci_bus_sem); |
140 | 139 | ||
141 | list_for_each(tmp, &bus->devices) { | 140 | list_for_each_entry(dev, &bus->devices, bus_list) { |
142 | dev = pci_dev_b(tmp); | ||
143 | if (dev->devfn == devfn) | 141 | if (dev->devfn == devfn) |
144 | goto out; | 142 | goto out; |
145 | } | 143 | } |