1
0
Fork 0

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>
hifive-unleashed-5.1
Yijing Wang 2013-09-05 15:55:29 +08:00 committed by Bjorn Helgaas
parent 4a10c2ac2f
commit fdfe151127
1 changed files with 1 additions and 2 deletions

View File

@ -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;