Skip to content

Commit

Permalink
PCI hotplug: use pci_pcie_cap()
Browse files Browse the repository at this point in the history
Use pci_pcie_cap() instead of pci_find_capability() to get PCIe capability
offset in PCI hotplug core. 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>
  • Loading branch information
Kenji Kaneshige authored and Jesse Barnes committed Nov 24, 2009
1 parent db9538a commit d3ccc40
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/pci/hotplug/pcihp_slot.c
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ static void program_hpp_type2(struct pci_dev *dev, struct hpp_type2 *hpp)
return;

/* Find PCI Express capability */
pos = pci_find_capability(dev, PCI_CAP_ID_EXP);
pos = pci_pcie_cap(dev);
if (!pos)
return;

Expand Down

0 comments on commit d3ccc40

Please sign in to comment.