aboutsummaryrefslogtreecommitdiff
path: root/drivers/pci/search.c
diff options
context:
space:
mode:
authorBjorn Helgaas <bhelgaas@google.com>2012-08-23 18:36:10 -0600
committerBjorn Helgaas <bhelgaas@google.com>2012-08-23 18:36:10 -0600
commit7bf79d8a9904ee1ed354e7e655f8045afda67fd6 (patch)
treefde1ddd5e0743b9585bef508ff0baf7a8d90288f /drivers/pci/search.c
parenta28afda8cc6a45b2c5a4f98cf8fcddd877597701 (diff)
parentc29aabe22eafb4914aecebab6e99623894d81564 (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.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/pci/search.c b/drivers/pci/search.c
index 621b162ceb6..d84cdcfaacf 100644
--- a/drivers/pci/search.c
+++ b/drivers/pci/search.c
@@ -130,16 +130,14 @@ pci_find_next_bus(const struct pci_bus *from)
* decrement the reference count by calling pci_dev_put().
* If no device is found, %NULL is returned.
*/
-struct pci_dev * pci_get_slot(struct pci_bus *bus, unsigned int devfn)
+struct pci_dev *pci_get_slot(struct pci_bus *bus, unsigned int devfn)
{
- struct list_head *tmp;
struct pci_dev *dev;
WARN_ON(in_interrupt());
down_read(&pci_bus_sem);
- list_for_each(tmp, &bus->devices) {
- dev = pci_dev_b(tmp);
+ list_for_each_entry(dev, &bus->devices, bus_list) {
if (dev->devfn == devfn)
goto out;
}