diff options
author | Sinan Kaya <okaya@codeaurora.org> | 2017-12-19 00:37:52 -0500 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2018-01-17 09:16:46 -0500 |
commit | 48ec053518a2c98c02fb162fefe5a7eaa0ba9040 (patch) | |
tree | 8f06998e794920670f3914a7d0a983b6ae409fe6 /drivers/pci/hotplug/ibmphp_core.c | |
parent | 8658e819e3d5c82031df14502923723255279b3e (diff) |
PCI: ibmphp: 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.
Getting ready to remove pci_get_bus_and_slot() function in favor of
pci_get_domain_bus_and_slot().
Hard-coding the domain parameter as 0 since the code doesn't seem to be
ready for multiple domains.
Signed-off-by: Sinan Kaya <okaya@codeaurora.org>
Signed-off-by: Bjorn Helgaas <helgaas@kernel.org>
Diffstat (limited to 'drivers/pci/hotplug/ibmphp_core.c')
-rw-r--r-- | drivers/pci/hotplug/ibmphp_core.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/pci/hotplug/ibmphp_core.c b/drivers/pci/hotplug/ibmphp_core.c index 73cf84645c82..92dd88296817 100644 --- a/drivers/pci/hotplug/ibmphp_core.c +++ b/drivers/pci/hotplug/ibmphp_core.c | |||
@@ -707,7 +707,8 @@ static void ibm_unconfigure_device(struct pci_func *func) | |||
707 | pci_lock_rescan_remove(); | 707 | pci_lock_rescan_remove(); |
708 | 708 | ||
709 | for (j = 0; j < 0x08; j++) { | 709 | for (j = 0; j < 0x08; j++) { |
710 | temp = pci_get_bus_and_slot(func->busno, (func->device << 3) | j); | 710 | temp = pci_get_domain_bus_and_slot(0, func->busno, |
711 | (func->device << 3) | j); | ||
711 | if (temp) { | 712 | if (temp) { |
712 | pci_stop_and_remove_bus_device(temp); | 713 | pci_stop_and_remove_bus_device(temp); |
713 | pci_dev_put(temp); | 714 | pci_dev_put(temp); |
@@ -780,7 +781,7 @@ static int ibm_configure_device(struct pci_func *func) | |||
780 | if (!(bus_structure_fixup(func->busno))) | 781 | if (!(bus_structure_fixup(func->busno))) |
781 | flag = 1; | 782 | flag = 1; |
782 | if (func->dev == NULL) | 783 | if (func->dev == NULL) |
783 | func->dev = pci_get_bus_and_slot(func->busno, | 784 | func->dev = pci_get_domain_bus_and_slot(0, func->busno, |
784 | PCI_DEVFN(func->device, func->function)); | 785 | PCI_DEVFN(func->device, func->function)); |
785 | 786 | ||
786 | if (func->dev == NULL) { | 787 | if (func->dev == NULL) { |
@@ -793,7 +794,7 @@ static int ibm_configure_device(struct pci_func *func) | |||
793 | if (num) | 794 | if (num) |
794 | pci_bus_add_devices(bus); | 795 | pci_bus_add_devices(bus); |
795 | 796 | ||
796 | func->dev = pci_get_bus_and_slot(func->busno, | 797 | func->dev = pci_get_domain_bus_and_slot(0, func->busno, |
797 | PCI_DEVFN(func->device, func->function)); | 798 | PCI_DEVFN(func->device, func->function)); |
798 | if (func->dev == NULL) { | 799 | if (func->dev == NULL) { |
799 | err("ERROR... : pci_dev still NULL\n"); | 800 | err("ERROR... : pci_dev still NULL\n"); |