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
This commit is contained in:
Bjorn Helgaas 2012-08-23 18:36:10 -06:00
commit 7bf79d8a99
11 changed files with 47 additions and 263 deletions

View file

@ -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;
}