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>
This commit is contained in:
parent
4a10c2ac2f
commit
fdfe151127
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue