aboutsummaryrefslogtreecommitdiff
path: root/drivers/pci/probe.c
diff options
context:
space:
mode:
authorYijing Wang <wangyijing@huawei.com>2013-09-05 15:55:29 +0800
committerBjorn Helgaas <bhelgaas@google.com>2013-09-23 17:30:03 -0600
commitfdfe151127a75de037c7e32cef110ae9c7c5e3c8 (patch)
tree8f83ed292e1c2dda47dbb6795e893ea51322d954 /drivers/pci/probe.c
parent4a10c2ac2f368583138b774ca41fac4207911983 (diff)
PCI: Use pci_is_pcie() to simplify code
Use pci_is_pcie() instead of pci_find_capability() to simplify code. Signed-off-by: Yijing Wang <wangyijing@huawei.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'drivers/pci/probe.c')
-rw-r--r--drivers/pci/probe.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
index 7ef0f868b3e..c90d0f8021e 100644
--- a/drivers/pci/probe.c
+++ b/drivers/pci/probe.c
@@ -641,8 +641,7 @@ static void pci_set_bus_speed(struct pci_bus *bus)
return;
}
- pos = pci_find_capability(bridge, PCI_CAP_ID_EXP);
- if (pos) {
+ if (pci_is_pcie(bridge)) {
u32 linkcap;
u16 linksta;