summaryrefslogtreecommitdiffstats
path: root/drivers/pci/hotplug/pciehp_pci.c
diff options
context:
space:
mode:
authorKenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>2007-11-09 17:28:11 +0900
committerGreg Kroah-Hartman <gregkh@suse.de>2008-02-01 15:04:24 -0800
commit9515930ea2a9a51382a9668569ce008bb46a09bb (patch)
treead2f1f6883d34a1a18d2a3cab8a2c81abfdb54af /drivers/pci/hotplug/pciehp_pci.c
parent941f10e941ec31beeec4af3ad38644da581010c4 (diff)
downloadblackbird-op-linux-9515930ea2a9a51382a9668569ce008bb46a09bb.tar.gz
blackbird-op-linux-9515930ea2a9a51382a9668569ce008bb46a09bb.zip
PCI Hotplug: pciehp: use generic function to find ext capability
Remove duplicated code to find an extend capability in PCIEHP driver. Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com> Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/pci/hotplug/pciehp_pci.c')
-rw-r--r--drivers/pci/hotplug/pciehp_pci.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/pci/hotplug/pciehp_pci.c b/drivers/pci/hotplug/pciehp_pci.c
index c424aded13fb..c09b0c2f8065 100644
--- a/drivers/pci/hotplug/pciehp_pci.c
+++ b/drivers/pci/hotplug/pciehp_pci.c
@@ -105,12 +105,7 @@ static void program_hpp_type2(struct pci_dev *dev, struct hpp_type2 *hpp)
}
/* Find Advanced Error Reporting Enhanced Capability */
- pos = 256;
- do {
- pci_read_config_dword(dev, pos, &reg32);
- if (PCI_EXT_CAP_ID(reg32) == PCI_EXT_CAP_ID_ERR)
- break;
- } while ((pos = PCI_EXT_CAP_NEXT(reg32)));
+ pos = pci_find_ext_capability(dev, PCI_EXT_CAP_ID_ERR);
if (!pos)
return;
OpenPOWER on IntegriCloud