Skip to content

Commit 9ee8a1c

Browse files
Lorenzo Pieralisibjorn-helgaas
authored andcommitted
PCI: Remove pci_scan_root_bus_msi()
The pci_scan_root_bus_bridge() function allows passing a parameterized struct pci_host_bridge and scanning the resulting PCI bus; since the struct msi_controller is part of the struct pci_host_bridge and the struct pci_host_bridge can now be passed to pci_scan_root_bus_bridge() explicitly, there is no need for a scan interface with a MSI controller parameter. With all PCI host controller drivers and platform code relying on pci_scan_root_bus_msi() converted over to pci_scan_root_bus_bridge() the pci_scan_root_bus_msi() becomes obsolete and can be removed. Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
1 parent 123db53 commit 9ee8a1c

File tree

2 files changed

+5
-26
lines changed

2 files changed

+5
-26
lines changed

drivers/pci/probe.c

Lines changed: 5 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2324,9 +2324,8 @@ void __weak pcibios_remove_bus(struct pci_bus *bus)
23242324
{
23252325
}
23262326

2327-
static struct pci_bus *pci_create_root_bus_msi(struct device *parent,
2328-
int bus, struct pci_ops *ops, void *sysdata,
2329-
struct list_head *resources, struct msi_controller *msi)
2327+
struct pci_bus *pci_create_root_bus(struct device *parent, int bus,
2328+
struct pci_ops *ops, void *sysdata, struct list_head *resources)
23302329
{
23312330
int error;
23322331
struct pci_host_bridge *bridge;
@@ -2341,7 +2340,6 @@ static struct pci_bus *pci_create_root_bus_msi(struct device *parent,
23412340
bridge->sysdata = sysdata;
23422341
bridge->busnr = bus;
23432342
bridge->ops = ops;
2344-
bridge->msi = msi;
23452343

23462344
error = pci_register_host_bridge(bridge);
23472345
if (error < 0)
@@ -2353,13 +2351,6 @@ static struct pci_bus *pci_create_root_bus_msi(struct device *parent,
23532351
kfree(bridge);
23542352
return NULL;
23552353
}
2356-
2357-
struct pci_bus *pci_create_root_bus(struct device *parent, int bus,
2358-
struct pci_ops *ops, void *sysdata, struct list_head *resources)
2359-
{
2360-
return pci_create_root_bus_msi(parent, bus, ops, sysdata, resources,
2361-
NULL);
2362-
}
23632354
EXPORT_SYMBOL_GPL(pci_create_root_bus);
23642355

23652356
int pci_bus_insert_busn_res(struct pci_bus *b, int bus, int bus_max)
@@ -2464,9 +2455,8 @@ int pci_scan_root_bus_bridge(struct pci_host_bridge *bridge)
24642455
}
24652456
EXPORT_SYMBOL(pci_scan_root_bus_bridge);
24662457

2467-
struct pci_bus *pci_scan_root_bus_msi(struct device *parent, int bus,
2468-
struct pci_ops *ops, void *sysdata,
2469-
struct list_head *resources, struct msi_controller *msi)
2458+
struct pci_bus *pci_scan_root_bus(struct device *parent, int bus,
2459+
struct pci_ops *ops, void *sysdata, struct list_head *resources)
24702460
{
24712461
struct resource_entry *window;
24722462
bool found = false;
@@ -2479,7 +2469,7 @@ struct pci_bus *pci_scan_root_bus_msi(struct device *parent, int bus,
24792469
break;
24802470
}
24812471

2482-
b = pci_create_root_bus_msi(parent, bus, ops, sysdata, resources, msi);
2472+
b = pci_create_root_bus(parent, bus, ops, sysdata, resources);
24832473
if (!b)
24842474
return NULL;
24852475

@@ -2497,13 +2487,6 @@ struct pci_bus *pci_scan_root_bus_msi(struct device *parent, int bus,
24972487

24982488
return b;
24992489
}
2500-
2501-
struct pci_bus *pci_scan_root_bus(struct device *parent, int bus,
2502-
struct pci_ops *ops, void *sysdata, struct list_head *resources)
2503-
{
2504-
return pci_scan_root_bus_msi(parent, bus, ops, sysdata, resources,
2505-
NULL);
2506-
}
25072490
EXPORT_SYMBOL(pci_scan_root_bus);
25082491

25092492
struct pci_bus *pci_scan_bus(int bus, struct pci_ops *ops,

include/linux/pci.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -849,10 +849,6 @@ struct pci_bus *pci_create_root_bus(struct device *parent, int bus,
849849
int pci_bus_insert_busn_res(struct pci_bus *b, int bus, int busmax);
850850
int pci_bus_update_busn_res_end(struct pci_bus *b, int busmax);
851851
void pci_bus_release_busn_res(struct pci_bus *b);
852-
struct pci_bus *pci_scan_root_bus_msi(struct device *parent, int bus,
853-
struct pci_ops *ops, void *sysdata,
854-
struct list_head *resources,
855-
struct msi_controller *msi);
856852
struct pci_bus *pci_scan_root_bus(struct device *parent, int bus,
857853
struct pci_ops *ops, void *sysdata,
858854
struct list_head *resources);

0 commit comments

Comments
 (0)