PCI: cache PCIe capability offset
authorKenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Thu, 5 Nov 2009 03:05:11 +0000 (12:05 +0900)
committerJesse Barnes <jbarnes@virtuousgeek.org>
Fri, 6 Nov 2009 21:59:02 +0000 (13:59 -0800)
There are a lot of codes that searches PCI express capability offset
in the PCI configuration space using pci_find_capability(). Caching it
in the struct pci_dev will reduce unncecessary search. This patch adds
an additional 'pcie_cap' fields into struct pci_dev, which is
initialized at pci device scan time (in set_pcie_port_type()).

Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>

No differences found