Message ID | 1378367730-25996-5-git-send-email-wangyijing@huawei.com (mailing list archive) |
---|---|
State | New, archived |
Delegated to: | Bjorn Helgaas |
Headers | show |
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index eeb50bd..0fa9075 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;
Use pci_is_pcie() instead of pci_find_capability to simplify code. Signed-off-by: Yijing Wang <wangyijing@huawei.com> --- drivers/pci/probe.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-)