]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
PCI: Move struct pci_bus_resource into bus.c
authorIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Thu, 17 Oct 2024 14:11:09 +0000 (17:11 +0300)
committerBjorn Helgaas <bhelgaas@google.com>
Fri, 18 Oct 2024 18:35:22 +0000 (13:35 -0500)
The struct pci_bus_resource is only used in bus.c, so move it there.

Link: https://lore.kernel.org/r/20241017141111.44612-2-ilpo.jarvinen@linux.intel.com
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/pci/bus.c
include/linux/pci.h

index 9cf6d0f3ab2be4513be80ba5b36aba0a3922f025..e0a2441be6d3265b8c1bea5fc2e5e3fe1ee12d19 100644 (file)
 
 #include "pci.h"
 
+/*
+ * The first PCI_BRIDGE_RESOURCE_NUM PCI bus resources (those that correspond
+ * to P2P or CardBus bridge windows) go in a table.  Additional ones (for
+ * buses below host bridges or subtractive decode bridges) go in the list.
+ * Use pci_bus_for_each_resource() to iterate through all the resources.
+ */
+
+struct pci_bus_resource {
+       struct list_head        list;
+       struct resource         *res;
+};
+
 void pci_add_resource_offset(struct list_head *resources, struct resource *res,
                             resource_size_t offset)
 {
index 6a9cf80d0d4baffc725941c68e42c87b5e938ec4..5a9d849b28ef340599c0270ef137a34e36f3857b 100644 (file)
@@ -626,18 +626,6 @@ void pci_set_host_bridge_release(struct pci_host_bridge *bridge,
 
 int pcibios_root_bridge_prepare(struct pci_host_bridge *bridge);
 
-/*
- * The first PCI_BRIDGE_RESOURCE_NUM PCI bus resources (those that correspond
- * to P2P or CardBus bridge windows) go in a table.  Additional ones (for
- * buses below host bridges or subtractive decode bridges) go in the list.
- * Use pci_bus_for_each_resource() to iterate through all the resources.
- */
-
-struct pci_bus_resource {
-       struct list_head        list;
-       struct resource         *res;
-};
-
 #define PCI_REGION_FLAG_MASK   0x0fU   /* These bits of resource flags tell us the PCI region flags */
 
 struct pci_bus {