diff options
author | Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> | 2017-06-28 16:14:01 -0400 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2017-07-02 17:14:27 -0400 |
commit | 9ee8a1c4a0e232e9b86e03f7c628ff0286444e00 (patch) | |
tree | 9faf0a147cd9d74d1e96ea30dc5beece2457a723 | |
parent | 123db533072e58838e32ba9ffc102c476788ec2b (diff) |
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>
-rw-r--r-- | drivers/pci/probe.c | 27 | ||||
-rw-r--r-- | include/linux/pci.h | 4 |
2 files changed, 5 insertions, 26 deletions
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index 5c457c17cf5c..bd42ed42c199 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c | |||
@@ -2324,9 +2324,8 @@ void __weak pcibios_remove_bus(struct pci_bus *bus) | |||
2324 | { | 2324 | { |
2325 | } | 2325 | } |
2326 | 2326 | ||
2327 | static struct pci_bus *pci_create_root_bus_msi(struct device *parent, | 2327 | struct pci_bus *pci_create_root_bus(struct device *parent, int bus, |
2328 | int bus, struct pci_ops *ops, void *sysdata, | 2328 | struct pci_ops *ops, void *sysdata, struct list_head *resources) |
2329 | struct list_head *resources, struct msi_controller *msi) | ||
2330 | { | 2329 | { |
2331 | int error; | 2330 | int error; |
2332 | struct pci_host_bridge *bridge; | 2331 | struct pci_host_bridge *bridge; |
@@ -2341,7 +2340,6 @@ static struct pci_bus *pci_create_root_bus_msi(struct device *parent, | |||
2341 | bridge->sysdata = sysdata; | 2340 | bridge->sysdata = sysdata; |
2342 | bridge->busnr = bus; | 2341 | bridge->busnr = bus; |
2343 | bridge->ops = ops; | 2342 | bridge->ops = ops; |
2344 | bridge->msi = msi; | ||
2345 | 2343 | ||
2346 | error = pci_register_host_bridge(bridge); | 2344 | error = pci_register_host_bridge(bridge); |
2347 | if (error < 0) | 2345 | if (error < 0) |
@@ -2353,13 +2351,6 @@ err_out: | |||
2353 | kfree(bridge); | 2351 | kfree(bridge); |
2354 | return NULL; | 2352 | return NULL; |
2355 | } | 2353 | } |
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 | } | ||
2363 | EXPORT_SYMBOL_GPL(pci_create_root_bus); | 2354 | EXPORT_SYMBOL_GPL(pci_create_root_bus); |
2364 | 2355 | ||
2365 | int pci_bus_insert_busn_res(struct pci_bus *b, int bus, int bus_max) | 2356 | 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) | |||
2464 | } | 2455 | } |
2465 | EXPORT_SYMBOL(pci_scan_root_bus_bridge); | 2456 | EXPORT_SYMBOL(pci_scan_root_bus_bridge); |
2466 | 2457 | ||
2467 | struct pci_bus *pci_scan_root_bus_msi(struct device *parent, int bus, | 2458 | struct pci_bus *pci_scan_root_bus(struct device *parent, int bus, |
2468 | struct pci_ops *ops, void *sysdata, | 2459 | struct pci_ops *ops, void *sysdata, struct list_head *resources) |
2469 | struct list_head *resources, struct msi_controller *msi) | ||
2470 | { | 2460 | { |
2471 | struct resource_entry *window; | 2461 | struct resource_entry *window; |
2472 | bool found = false; | 2462 | bool found = false; |
@@ -2479,7 +2469,7 @@ struct pci_bus *pci_scan_root_bus_msi(struct device *parent, int bus, | |||
2479 | break; | 2469 | break; |
2480 | } | 2470 | } |
2481 | 2471 | ||
2482 | b = pci_create_root_bus_msi(parent, bus, ops, sysdata, resources, msi); | 2472 | b = pci_create_root_bus(parent, bus, ops, sysdata, resources); |
2483 | if (!b) | 2473 | if (!b) |
2484 | return NULL; | 2474 | return NULL; |
2485 | 2475 | ||
@@ -2497,13 +2487,6 @@ struct pci_bus *pci_scan_root_bus_msi(struct device *parent, int bus, | |||
2497 | 2487 | ||
2498 | return b; | 2488 | return b; |
2499 | } | 2489 | } |
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 | } | ||
2507 | EXPORT_SYMBOL(pci_scan_root_bus); | 2490 | EXPORT_SYMBOL(pci_scan_root_bus); |
2508 | 2491 | ||
2509 | struct pci_bus *pci_scan_bus(int bus, struct pci_ops *ops, | 2492 | struct pci_bus *pci_scan_bus(int bus, struct pci_ops *ops, |
diff --git a/include/linux/pci.h b/include/linux/pci.h index b56dc13f47c2..9022b542556a 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
@@ -849,10 +849,6 @@ struct pci_bus *pci_create_root_bus(struct device *parent, int bus, | |||
849 | int pci_bus_insert_busn_res(struct pci_bus *b, int bus, int busmax); | 849 | int pci_bus_insert_busn_res(struct pci_bus *b, int bus, int busmax); |
850 | int pci_bus_update_busn_res_end(struct pci_bus *b, int busmax); | 850 | int pci_bus_update_busn_res_end(struct pci_bus *b, int busmax); |
851 | void pci_bus_release_busn_res(struct pci_bus *b); | 851 | 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); | ||
856 | struct pci_bus *pci_scan_root_bus(struct device *parent, int bus, | 852 | struct pci_bus *pci_scan_root_bus(struct device *parent, int bus, |
857 | struct pci_ops *ops, void *sysdata, | 853 | struct pci_ops *ops, void *sysdata, |
858 | struct list_head *resources); | 854 | struct list_head *resources); |