]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
PCI: remove pci_bus_find_ext_capability() (unused)
authorBjorn Helgaas <bhelgaas@google.com>
Fri, 18 May 2012 22:52:19 +0000 (16:52 -0600)
committerBjorn Helgaas <bhelgaas@google.com>
Mon, 11 Jun 2012 17:23:23 +0000 (11:23 -0600)
pci_bus_find_ext_capability() is unused, and this patch removes it.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
drivers/pci/pci.c
include/linux/pci.h

index 447e83472c01558705d0685f7fd6af17a6f8deef..de9386da2eb2386140fbc268f99628326de12e6c 100644 (file)
@@ -329,49 +329,6 @@ int pci_find_ext_capability(struct pci_dev *dev, int cap)
 }
 EXPORT_SYMBOL_GPL(pci_find_ext_capability);
 
-/**
- * pci_bus_find_ext_capability - find an extended capability
- * @bus:   the PCI bus to query
- * @devfn: PCI device to query
- * @cap:   capability code
- *
- * Like pci_find_ext_capability() but works for pci devices that do not have a
- * pci_dev structure set up yet.
- *
- * Returns the address of the requested capability structure within the
- * device's PCI configuration space or 0 in case the device does not
- * support it.
- */
-int pci_bus_find_ext_capability(struct pci_bus *bus, unsigned int devfn,
-                               int cap)
-{
-       u32 header;
-       int ttl;
-       int pos = PCI_CFG_SPACE_SIZE;
-
-       /* minimum 8 bytes per capability */
-       ttl = (PCI_CFG_SPACE_EXP_SIZE - PCI_CFG_SPACE_SIZE) / 8;
-
-       if (!pci_bus_read_config_dword(bus, devfn, pos, &header))
-               return 0;
-       if (header == 0xffffffff || header == 0)
-               return 0;
-
-       while (ttl-- > 0) {
-               if (PCI_EXT_CAP_ID(header) == cap)
-                       return pos;
-
-               pos = PCI_EXT_CAP_NEXT(header);
-               if (pos < PCI_CFG_SPACE_SIZE)
-                       break;
-
-               if (!pci_bus_read_config_dword(bus, devfn, pos, &header))
-                       break;
-       }
-
-       return 0;
-}
-
 static int __pci_find_next_ht_cap(struct pci_dev *dev, int pos, int ht_cap)
 {
        int rc, ttl = PCI_FIND_CAP_TTL;
index d8c379dba6adbb36ae9df6c18adea304e2c6b45c..2618ad996535d797603b389e2af6fe1680f0e27c 100644 (file)
@@ -714,8 +714,6 @@ enum pci_lost_interrupt_reason pci_lost_interrupt(struct pci_dev *dev);
 int pci_find_capability(struct pci_dev *dev, int cap);
 int pci_find_next_capability(struct pci_dev *dev, u8 pos, int cap);
 int pci_find_ext_capability(struct pci_dev *dev, int cap);
-int pci_bus_find_ext_capability(struct pci_bus *bus, unsigned int devfn,
-                               int cap);
 int pci_find_ht_capability(struct pci_dev *dev, int ht_cap);
 int pci_find_next_ht_capability(struct pci_dev *dev, int pos, int ht_cap);
 struct pci_bus *pci_find_next_bus(const struct pci_bus *from);