diff options
author | Yicong Yang <yangyicong@hisilicon.com> | 2020-05-09 18:19:28 +0800 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2020-05-14 16:35:09 -0500 |
commit | 6ae72bfa656ea04806f98ef85cb44b0789064362 (patch) | |
tree | 3e476c1b2f8c95051f631686d1158042c4a4d4f8 /drivers/thunderbolt | |
parent | 914a1951d88968371c7d43400c9d936382cd7d69 (diff) | |
download | linux-6ae72bfa656ea04806f98ef85cb44b0789064362.tar.gz linux-6ae72bfa656ea04806f98ef85cb44b0789064362.tar.bz2 linux-6ae72bfa656ea04806f98ef85cb44b0789064362.zip |
PCI: Unify pcie_find_root_port() and pci_find_pcie_root_port()
Previously we used pcie_find_root_port() to find a Root Port from a PCIe
device and pci_find_pcie_root_port() to find a Root Port from a
Conventional PCI device.
Unify the two functions and use pcie_find_root_port() to find a Root Port
from either a Conventional PCI device or a PCIe device. Then there is no
need to distinguish the type of the device.
Link: https://lore.kernel.org/r/1589019568-5216-1-git-send-email-yangyicong@hisilicon.com
Signed-off-by: Yicong Yang <yangyicong@hisilicon.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Kalle Valo <kvalo@codeaurora.org> # wireless
Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com> # thunderbolt
Diffstat (limited to 'drivers/thunderbolt')
-rw-r--r-- | drivers/thunderbolt/switch.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/thunderbolt/switch.c b/drivers/thunderbolt/switch.c index a2ce99051c51..d92c7554520b 100644 --- a/drivers/thunderbolt/switch.c +++ b/drivers/thunderbolt/switch.c @@ -263,7 +263,7 @@ static void nvm_authenticate_start_dma_port(struct tb_switch *sw) * itself. To be on the safe side keep the root port in D0 during * the whole upgrade process. */ - root_port = pci_find_pcie_root_port(sw->tb->nhi->pdev); + root_port = pcie_find_root_port(sw->tb->nhi->pdev); if (root_port) pm_runtime_get_noresume(&root_port->dev); } @@ -272,7 +272,7 @@ static void nvm_authenticate_complete_dma_port(struct tb_switch *sw) { struct pci_dev *root_port; - root_port = pci_find_pcie_root_port(sw->tb->nhi->pdev); + root_port = pcie_find_root_port(sw->tb->nhi->pdev); if (root_port) pm_runtime_put(&root_port->dev); } |