]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
PCI: Convert pcibios_resource_to_bus() to take a pci_bus, not a pci_dev
authorYinghai Lu <yinghai@kernel.org>
Tue, 10 Dec 2013 06:54:40 +0000 (22:54 -0800)
committerZefan Li <lizefan@huawei.com>
Fri, 19 Jun 2015 03:40:34 +0000 (11:40 +0800)
commitbded67cc51db4e29af84f9ec1d671a86b0b6763b
tree886108ad45fd36ac490e2e74c10d853b39e91566
parentedf76233db20b417ad0cb88cc9f4d4001fef1bd3
PCI: Convert pcibios_resource_to_bus() to take a pci_bus, not a pci_dev

commit fc2798502f860b18f3c7121e4dc659d3d9d28d74 upstream.

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>
Cc: Dirk Behme <dirk.behme@gmail.com>
[lizf: Backported to 3.4:
 - make changes to pci_host_bridge() instead of find_pci_root_bus()
 - adjust context]
Signed-off-by: Zefan Li <lizefan@huawei.com>
16 files changed:
arch/alpha/kernel/pci-sysfs.c
arch/powerpc/kernel/pci_of_scan.c
arch/powerpc/platforms/powernv/pci-ioda.c
arch/sparc/kernel/pci.c
drivers/pci/probe.c
drivers/pci/quirks.c
drivers/pci/rom.c
drivers/pci/setup-bus.c
drivers/pci/setup-res.c
drivers/pcmcia/i82092.c
drivers/pcmcia/yenta_socket.c
drivers/scsi/sym53c8xx_2/sym_glue.c
drivers/video/arkfb.c
drivers/video/s3fb.c
drivers/video/vt8623fb.c
include/linux/pci.h