aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSinan Kaya <okaya@codeaurora.org>2017-11-27 11:57:38 -0500
committerMatt Turner <mattst88@gmail.com>2018-01-20 20:01:04 -0500
commit797cfc4f714a13e33729859fb671cfd8b4131abc (patch)
treea4966242069f80b7af3d1ebdcb9b6a9315c6fb89
parent84e455361ec97ea6037d31d42a2955628ea2094b (diff)
alpha: deprecate pci_get_bus_and_slot()
pci_get_bus_and_slot() is restrictive such that it assumes domain=0 as where a PCI device is present. This restricts the device drivers to be reused for other domain numbers. Use pci_get_domain_bus_and_slot() with a domain number of 0 where we can't extract the domain number. Other places, use the actual domain number from the device. Signed-off-by: Sinan Kaya <okaya@codeaurora.org> Signed-off-by: Matt Turner <mattst88@gmail.com>
-rw-r--r--arch/alpha/kernel/pci.c2
-rw-r--r--arch/alpha/kernel/sys_nautilus.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/arch/alpha/kernel/pci.c b/arch/alpha/kernel/pci.c
index 87da00579946..2e86ebb680ae 100644
--- a/arch/alpha/kernel/pci.c
+++ b/arch/alpha/kernel/pci.c
@@ -425,7 +425,7 @@ sys_pciconfig_iobase(long which, unsigned long bus, unsigned long dfn)
425 if (bus == 0 && dfn == 0) { 425 if (bus == 0 && dfn == 0) {
426 hose = pci_isa_hose; 426 hose = pci_isa_hose;
427 } else { 427 } else {
428 dev = pci_get_bus_and_slot(bus, dfn); 428 dev = pci_get_domain_bus_and_slot(0, bus, dfn);
429 if (!dev) 429 if (!dev)
430 return -ENODEV; 430 return -ENODEV;
431 hose = dev->sysdata; 431 hose = dev->sysdata;
diff --git a/arch/alpha/kernel/sys_nautilus.c b/arch/alpha/kernel/sys_nautilus.c
index 239dc0e601d5..ff4f54b86c7f 100644
--- a/arch/alpha/kernel/sys_nautilus.c
+++ b/arch/alpha/kernel/sys_nautilus.c
@@ -237,7 +237,7 @@ nautilus_init_pci(void)
237 bus = hose->bus = bridge->bus; 237 bus = hose->bus = bridge->bus;
238 pcibios_claim_one_bus(bus); 238 pcibios_claim_one_bus(bus);
239 239
240 irongate = pci_get_bus_and_slot(0, 0); 240 irongate = pci_get_domain_bus_and_slot(pci_domain_nr(bus), 0, 0);
241 bus->self = irongate; 241 bus->self = irongate;
242 bus->resource[0] = &irongate_io; 242 bus->resource[0] = &irongate_io;
243 bus->resource[1] = &irongate_mem; 243 bus->resource[1] = &irongate_mem;