aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/probe.c
diff options
context:
space:
mode:
authorKenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>2009-11-11 00:30:56 -0500
committerJesse Barnes <jbarnes@virtuousgeek.org>2009-11-24 18:25:12 -0500
commit06a1cbafb253c4c60d6a54a994887f5fbceabcc0 (patch)
treee534c369ab1878a5d86996c29d629d1f5d8f9f75 /drivers/pci/probe.c
parentd7b7e60526d54da4c94afe5f137714cee7d05c41 (diff)
PCI: use pci_pcie_cap() in pci core
Use pcie_cap() instead of pci_find_capability() to get PCIe capability offset in PCI core code. This avoids unnecessary search in PCI configuration space. Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'drivers/pci/probe.c')
-rw-r--r--drivers/pci/probe.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
index 54b9f1501487..2fdffc02a308 100644
--- a/drivers/pci/probe.c
+++ b/drivers/pci/probe.c
@@ -703,7 +703,7 @@ static void set_pcie_hotplug_bridge(struct pci_dev *pdev)
703 u16 reg16; 703 u16 reg16;
704 u32 reg32; 704 u32 reg32;
705 705
706 pos = pci_find_capability(pdev, PCI_CAP_ID_EXP); 706 pos = pci_pcie_cap(pdev);
707 if (!pos) 707 if (!pos)
708 return; 708 return;
709 pci_read_config_word(pdev, pos + PCI_EXP_FLAGS, &reg16); 709 pci_read_config_word(pdev, pos + PCI_EXP_FLAGS, &reg16);
@@ -920,7 +920,7 @@ int pci_cfg_space_size(struct pci_dev *dev)
920 if (class == PCI_CLASS_BRIDGE_HOST) 920 if (class == PCI_CLASS_BRIDGE_HOST)
921 return pci_cfg_space_size_ext(dev); 921 return pci_cfg_space_size_ext(dev);
922 922
923 pos = pci_find_capability(dev, PCI_CAP_ID_EXP); 923 pos = pci_pcie_cap(dev);
924 if (!pos) { 924 if (!pos) {
925 pos = pci_find_capability(dev, PCI_CAP_ID_PCIX); 925 pos = pci_find_capability(dev, PCI_CAP_ID_PCIX);
926 if (!pos) 926 if (!pos)