diff options
author | 2013-09-05 15:55:29 +0800 | |
---|---|---|
committer | 2013-09-23 17:30:03 -0600 | |
commit | fdfe151127a75de037c7e32cef110ae9c7c5e3c8 (patch) | |
tree | 8f83ed292e1c2dda47dbb6795e893ea51322d954 | |
parent | Linux 3.12-rc2 (diff) | |
download | wireguard-linux-fdfe151127a75de037c7e32cef110ae9c7c5e3c8.tar.xz wireguard-linux-fdfe151127a75de037c7e32cef110ae9c7c5e3c8.zip |
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>
-rw-r--r-- | drivers/pci/probe.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index 7ef0f868b3e0..c90d0f8021e7 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; |