]> www.infradead.org Git - users/hch/block.git/commitdiff
PCI: dwc: Remove root_bus pointer
authorRob Herring <robh@kernel.org>
Fri, 21 Aug 2020 03:53:57 +0000 (21:53 -0600)
committerLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Tue, 8 Sep 2020 15:37:02 +0000 (16:37 +0100)
The pci_host_bridge struct already has a pointer to its pci_bus, so
let's convert the one user to use the bridge struct and remove the
private 'root_bus' pointer.

Link: https://lore.kernel.org/r/20200821035420.380495-18-robh@kernel.org
Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Cc: Jingoo Han <jingoohan1@gmail.com>
Cc: Gustavo Pimentel <gustavo.pimentel@synopsys.com>
Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>
Cc: Thierry Reding <thierry.reding@gmail.com>
Cc: Jonathan Hunter <jonathanh@nvidia.com>
Cc: linux-tegra@vger.kernel.org
drivers/pci/controller/dwc/pcie-designware-host.c
drivers/pci/controller/dwc/pcie-designware.h
drivers/pci/controller/dwc/pcie-tegra194.c

index 940edb3e2d3f71ad2507af0d5e92f15e6c00ae18..ca9d4e407b03c99d02d39f66a917c196aca37ee4 100644 (file)
@@ -448,8 +448,8 @@ EXPORT_SYMBOL_GPL(dw_pcie_host_init);
 
 void dw_pcie_host_deinit(struct pcie_port *pp)
 {
-       pci_stop_root_bus(pp->root_bus);
-       pci_remove_root_bus(pp->root_bus);
+       pci_stop_root_bus(pp->bridge->bus);
+       pci_remove_root_bus(pp->bridge->bus);
        if (pci_msi_enabled() && !pp->ops->msi_host_init)
                dw_pcie_free_msi(pp);
 }
index c018f199ca44e0da02ba45e4125e8e43a0ad4534..a24229d95714eb527f8ed30a17013831daa91a5b 100644 (file)
@@ -192,7 +192,6 @@ struct pcie_port {
        struct irq_chip         *msi_irq_chip;
        u32                     num_vectors;
        u32                     irq_mask[MAX_MSI_CTRLS];
-       struct pci_bus          *root_bus;
        struct pci_host_bridge  *bridge;
        raw_spinlock_t          lock;
        DECLARE_BITMAP(msi_irq_in_use, MAX_MSI_IRQS);
index b723c9f3ece4ac222da8b5a0601ea07edddd7408..a5dce56b3b7a6adb94a8c853f57c27b35c88edd2 100644 (file)
@@ -1264,9 +1264,9 @@ static void tegra_pcie_downstream_dev_to_D0(struct tegra_pcie_dw *pcie)
         * 5.2 Link State Power Management (Page #428).
         */
 
-       list_for_each_entry(child, &pp->root_bus->children, node) {
+       list_for_each_entry(child, &pp->bridge->bus->children, node) {
                /* Bring downstream devices to D0 if they are not already in */
-               if (child->parent == pp->root_bus) {
+               if (child->parent == pp->bridge->bus) {
                        root_bus = child;
                        break;
                }