Skip to content

Commit 469c9cb

Browse files
ij-intelbjorn-helgaas
authored andcommitted
PCI: Move struct pci_bus_resource into bus.c
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>
1 parent 6eaa83e commit 469c9cb

2 files changed

Lines changed: 12 additions & 12 deletions

File tree

drivers/pci/bus.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,18 @@
1818

1919
#include "pci.h"
2020

21+
/*
22+
* The first PCI_BRIDGE_RESOURCE_NUM PCI bus resources (those that correspond
23+
* to P2P or CardBus bridge windows) go in a table. Additional ones (for
24+
* buses below host bridges or subtractive decode bridges) go in the list.
25+
* Use pci_bus_for_each_resource() to iterate through all the resources.
26+
*/
27+
28+
struct pci_bus_resource {
29+
struct list_head list;
30+
struct resource *res;
31+
};
32+
2133
void pci_add_resource_offset(struct list_head *resources, struct resource *res,
2234
resource_size_t offset)
2335
{

include/linux/pci.h

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -626,18 +626,6 @@ void pci_set_host_bridge_release(struct pci_host_bridge *bridge,
626626

627627
int pcibios_root_bridge_prepare(struct pci_host_bridge *bridge);
628628

629-
/*
630-
* The first PCI_BRIDGE_RESOURCE_NUM PCI bus resources (those that correspond
631-
* to P2P or CardBus bridge windows) go in a table. Additional ones (for
632-
* buses below host bridges or subtractive decode bridges) go in the list.
633-
* Use pci_bus_for_each_resource() to iterate through all the resources.
634-
*/
635-
636-
struct pci_bus_resource {
637-
struct list_head list;
638-
struct resource *res;
639-
};
640-
641629
#define PCI_REGION_FLAG_MASK 0x0fU /* These bits of resource flags tell us the PCI region flags */
642630

643631
struct pci_bus {

0 commit comments

Comments
 (0)