Skip to content

Commit 5808d43

Browse files
robherringLorenzo Pieralisi
authored andcommitted
PCI: dwc: Remove root_bus pointer
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
1 parent 1df7930 commit 5808d43

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

drivers/pci/controller/dwc/pcie-designware-host.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -448,8 +448,8 @@ EXPORT_SYMBOL_GPL(dw_pcie_host_init);
448448

449449
void dw_pcie_host_deinit(struct pcie_port *pp)
450450
{
451-
pci_stop_root_bus(pp->root_bus);
452-
pci_remove_root_bus(pp->root_bus);
451+
pci_stop_root_bus(pp->bridge->bus);
452+
pci_remove_root_bus(pp->bridge->bus);
453453
if (pci_msi_enabled() && !pp->ops->msi_host_init)
454454
dw_pcie_free_msi(pp);
455455
}

drivers/pci/controller/dwc/pcie-designware.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,6 @@ struct pcie_port {
192192
struct irq_chip *msi_irq_chip;
193193
u32 num_vectors;
194194
u32 irq_mask[MAX_MSI_CTRLS];
195-
struct pci_bus *root_bus;
196195
struct pci_host_bridge *bridge;
197196
raw_spinlock_t lock;
198197
DECLARE_BITMAP(msi_irq_in_use, MAX_MSI_IRQS);

drivers/pci/controller/dwc/pcie-tegra194.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1264,9 +1264,9 @@ static void tegra_pcie_downstream_dev_to_D0(struct tegra_pcie_dw *pcie)
12641264
* 5.2 Link State Power Management (Page #428).
12651265
*/
12661266

1267-
list_for_each_entry(child, &pp->root_bus->children, node) {
1267+
list_for_each_entry(child, &pp->bridge->bus->children, node) {
12681268
/* Bring downstream devices to D0 if they are not already in */
1269-
if (child->parent == pp->root_bus) {
1269+
if (child->parent == pp->bridge->bus) {
12701270
root_bus = child;
12711271
break;
12721272
}

0 commit comments

Comments
 (0)