Skip to content

Commit

Permalink
PCI: Use pci_is_pcie() to simplify code
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Yijing Wang authored and Bjorn Helgaas committed Sep 23, 2013
1 parent 4a10c2a commit fdfe151
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/pci/probe.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit fdfe151

Please sign in to comment.