diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/pci/pci.c | 12 | ||||
-rw-r--r-- | drivers/pci/probe.c | 4 |
2 files changed, 8 insertions, 8 deletions
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index e3145f020271..bbc82f08d1c1 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c | |||
@@ -741,8 +741,8 @@ static int pci_save_pcie_state(struct pci_dev *dev) | |||
741 | u16 *cap; | 741 | u16 *cap; |
742 | u16 flags; | 742 | u16 flags; |
743 | 743 | ||
744 | pos = pci_find_capability(dev, PCI_CAP_ID_EXP); | 744 | pos = pci_pcie_cap(dev); |
745 | if (pos <= 0) | 745 | if (!pos) |
746 | return 0; | 746 | return 0; |
747 | 747 | ||
748 | save_state = pci_find_saved_cap(dev, PCI_CAP_ID_EXP); | 748 | save_state = pci_find_saved_cap(dev, PCI_CAP_ID_EXP); |
@@ -1535,7 +1535,7 @@ void pci_enable_ari(struct pci_dev *dev) | |||
1535 | if (!bridge || !bridge->is_pcie) | 1535 | if (!bridge || !bridge->is_pcie) |
1536 | return; | 1536 | return; |
1537 | 1537 | ||
1538 | pos = pci_find_capability(bridge, PCI_CAP_ID_EXP); | 1538 | pos = pci_pcie_cap(bridge); |
1539 | if (!pos) | 1539 | if (!pos) |
1540 | return; | 1540 | return; |
1541 | 1541 | ||
@@ -2140,7 +2140,7 @@ static int pcie_flr(struct pci_dev *dev, int probe) | |||
2140 | u32 cap; | 2140 | u32 cap; |
2141 | u16 status; | 2141 | u16 status; |
2142 | 2142 | ||
2143 | pos = pci_find_capability(dev, PCI_CAP_ID_EXP); | 2143 | pos = pci_pcie_cap(dev); |
2144 | if (!pos) | 2144 | if (!pos) |
2145 | return -ENOTTY; | 2145 | return -ENOTTY; |
2146 | 2146 | ||
@@ -2489,7 +2489,7 @@ int pcie_get_readrq(struct pci_dev *dev) | |||
2489 | int ret, cap; | 2489 | int ret, cap; |
2490 | u16 ctl; | 2490 | u16 ctl; |
2491 | 2491 | ||
2492 | cap = pci_find_capability(dev, PCI_CAP_ID_EXP); | 2492 | cap = pci_pcie_cap(dev); |
2493 | if (!cap) | 2493 | if (!cap) |
2494 | return -EINVAL; | 2494 | return -EINVAL; |
2495 | 2495 | ||
@@ -2519,7 +2519,7 @@ int pcie_set_readrq(struct pci_dev *dev, int rq) | |||
2519 | 2519 | ||
2520 | v = (ffs(rq) - 8) << 12; | 2520 | v = (ffs(rq) - 8) << 12; |
2521 | 2521 | ||
2522 | cap = pci_find_capability(dev, PCI_CAP_ID_EXP); | 2522 | cap = pci_pcie_cap(dev); |
2523 | if (!cap) | 2523 | if (!cap) |
2524 | goto out; | 2524 | goto out; |
2525 | 2525 | ||
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index 54b9f1501487..2fdffc02a308 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c | |||
@@ -703,7 +703,7 @@ static void set_pcie_hotplug_bridge(struct pci_dev *pdev) | |||
703 | u16 reg16; | 703 | u16 reg16; |
704 | u32 reg32; | 704 | u32 reg32; |
705 | 705 | ||
706 | pos = pci_find_capability(pdev, PCI_CAP_ID_EXP); | 706 | pos = pci_pcie_cap(pdev); |
707 | if (!pos) | 707 | if (!pos) |
708 | return; | 708 | return; |
709 | pci_read_config_word(pdev, pos + PCI_EXP_FLAGS, ®16); | 709 | pci_read_config_word(pdev, pos + PCI_EXP_FLAGS, ®16); |
@@ -920,7 +920,7 @@ int pci_cfg_space_size(struct pci_dev *dev) | |||
920 | if (class == PCI_CLASS_BRIDGE_HOST) | 920 | if (class == PCI_CLASS_BRIDGE_HOST) |
921 | return pci_cfg_space_size_ext(dev); | 921 | return pci_cfg_space_size_ext(dev); |
922 | 922 | ||
923 | pos = pci_find_capability(dev, PCI_CAP_ID_EXP); | 923 | pos = pci_pcie_cap(dev); |
924 | if (!pos) { | 924 | if (!pos) { |
925 | pos = pci_find_capability(dev, PCI_CAP_ID_PCIX); | 925 | pos = pci_find_capability(dev, PCI_CAP_ID_PCIX); |
926 | if (!pos) | 926 | if (!pos) |