Skip to content

Commit

Permalink
alpha: deprecate pci_get_bus_and_slot()
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Matt Turner <[email protected]>
  • Loading branch information
Sinan Kaya authored and mattst88 committed Jan 21, 2018
1 parent 84e4553 commit 797cfc4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion arch/alpha/kernel/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ sys_pciconfig_iobase(long which, unsigned long bus, unsigned long dfn)
if (bus == 0 && dfn == 0) {
hose = pci_isa_hose;
} else {
dev = pci_get_bus_and_slot(bus, dfn);
dev = pci_get_domain_bus_and_slot(0, bus, dfn);
if (!dev)
return -ENODEV;
hose = dev->sysdata;
Expand Down
2 changes: 1 addition & 1 deletion arch/alpha/kernel/sys_nautilus.c
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ nautilus_init_pci(void)
bus = hose->bus = bridge->bus;
pcibios_claim_one_bus(bus);

irongate = pci_get_bus_and_slot(0, 0);
irongate = pci_get_domain_bus_and_slot(pci_domain_nr(bus), 0, 0);
bus->self = irongate;
bus->resource[0] = &irongate_io;
bus->resource[1] = &irongate_mem;
Expand Down

0 comments on commit 797cfc4

Please sign in to comment.