[PATCH 03/16] pci: rename parent_bus to parent

Sascha Hauer s.hauer at pengutronix.de
Tue Mar 26 03:07:33 PDT 2024


In Linux struct pci_bus has a pointer to its parent bus named 'parent'.
Rename parent_bus to parent to be more conform with Linux.

Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
 drivers/pci/pci-layerscape.c | 2 +-
 drivers/pci/pci.c            | 2 +-
 include/linux/pci.h          | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/pci/pci-layerscape.c b/drivers/pci/pci-layerscape.c
index 12a0ec71a7..732232dec5 100644
--- a/drivers/pci/pci-layerscape.c
+++ b/drivers/pci/pci-layerscape.c
@@ -560,7 +560,7 @@ static void ls_pcie_fixup(struct pci_dev *pcidev)
 	p = pcidev->bus;
 	while (p) {
 		base_bus_num = p->number;
-		p = p->parent_bus;
+		p = p->parent;
 	}
 
 	devid = (pcidev->bus->number - base_bus_num) << 8 | pcidev->devfn;
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index 8b96ac78df..15e8cd46bd 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -662,7 +662,7 @@ static unsigned int pci_scan_bus(struct pci_bus *bus)
 			child_bus = pci_alloc_bus();
 			/* inherit parent properties */
 			child_bus->host = bus->host;
-			child_bus->parent_bus = bus;
+			child_bus->parent = bus;
 			child_bus->resource[PCI_BUS_RESOURCE_MEM] =
 				bus->resource[PCI_BUS_RESOURCE_MEM];
 			child_bus->resource[PCI_BUS_RESOURCE_MEM_PREF] =
diff --git a/include/linux/pci.h b/include/linux/pci.h
index c4ae53a235..4d4ab818f8 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -143,7 +143,7 @@ enum {
 struct pci_bus {
 	struct pci_controller *host;	/* associated host controller */
 	struct pci_dev *self;
-	struct pci_bus *parent_bus;	/* parent bus */
+	struct pci_bus *parent;		/* Parent bus this bridge is on */
 	struct list_head node;		/* node in list of buses */
 	struct list_head children;	/* list of child buses */
 	struct list_head devices;	/* list of devices on this bus */
-- 
2.39.2




More information about the barebox mailing list