mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
PCI: Convert pcibios_resource_to_bus() to take a pci_bus, not a pci_dev
These interfaces: pcibios_resource_to_bus(struct pci_dev *dev, *bus_region, *resource) pcibios_bus_to_resource(struct pci_dev *dev, *resource, *bus_region) took a pci_dev, but they really depend only on the pci_bus. And we want to use them in resource allocation paths where we have the bus but not a device, so this patch converts them to take the pci_bus instead of the pci_dev: pcibios_resource_to_bus(struct pci_bus *bus, *bus_region, *resource) pcibios_bus_to_resource(struct pci_bus *bus, *resource, *bus_region) In fact, with standard PCI-PCI bridges, they only depend on the host bridge, because that's the only place address translation occurs, but we aren't going that far yet. [bhelgaas: changelog] Signed-off-by: Yinghai Lu <yinghai@kernel.org> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
This commit is contained in:
parent
0a5ef7b914
commit
fc2798502f
17 changed files with 49 additions and 51 deletions
|
@ -737,9 +737,9 @@ void pci_fixup_cardbus(struct pci_bus *);
|
|||
|
||||
/* Generic PCI functions used internally */
|
||||
|
||||
void pcibios_resource_to_bus(struct pci_dev *dev, struct pci_bus_region *region,
|
||||
void pcibios_resource_to_bus(struct pci_bus *bus, struct pci_bus_region *region,
|
||||
struct resource *res);
|
||||
void pcibios_bus_to_resource(struct pci_dev *dev, struct resource *res,
|
||||
void pcibios_bus_to_resource(struct pci_bus *bus, struct resource *res,
|
||||
struct pci_bus_region *region);
|
||||
void pcibios_scan_specific_bus(int busn);
|
||||
struct pci_bus *pci_find_bus(int domain, int busnr);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue