diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/pci/hotplug/ibmphp_core.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/pci/hotplug/ibmphp_core.c b/drivers/pci/hotplug/ibmphp_core.c index a90c28d0c69d..87b6b8b280e6 100644 --- a/drivers/pci/hotplug/ibmphp_core.c +++ b/drivers/pci/hotplug/ibmphp_core.c | |||
@@ -761,10 +761,13 @@ static void ibm_unconfigure_device(struct pci_func *func) | |||
761 | debug("func->device << 3 | 0x0 = %x\n", func->device << 3 | 0x0); | 761 | debug("func->device << 3 | 0x0 = %x\n", func->device << 3 | 0x0); |
762 | 762 | ||
763 | for (j = 0; j < 0x08; j++) { | 763 | for (j = 0; j < 0x08; j++) { |
764 | temp = pci_find_slot(func->busno, (func->device << 3) | j); | 764 | temp = pci_get_bus_and_slot(func->busno, (func->device << 3) | j); |
765 | if (temp) | 765 | if (temp) { |
766 | pci_remove_bus_device(temp); | 766 | pci_remove_bus_device(temp); |
767 | pci_dev_put(temp); | ||
768 | } | ||
767 | } | 769 | } |
770 | pci_dev_put(func->dev); | ||
768 | } | 771 | } |
769 | 772 | ||
770 | /* | 773 | /* |
@@ -823,7 +826,7 @@ static int ibm_configure_device(struct pci_func *func) | |||
823 | if (!(bus_structure_fixup(func->busno))) | 826 | if (!(bus_structure_fixup(func->busno))) |
824 | flag = 1; | 827 | flag = 1; |
825 | if (func->dev == NULL) | 828 | if (func->dev == NULL) |
826 | func->dev = pci_find_slot(func->busno, | 829 | func->dev = pci_get_bus_and_slot(func->busno, |
827 | PCI_DEVFN(func->device, func->function)); | 830 | PCI_DEVFN(func->device, func->function)); |
828 | 831 | ||
829 | if (func->dev == NULL) { | 832 | if (func->dev == NULL) { |
@@ -836,7 +839,7 @@ static int ibm_configure_device(struct pci_func *func) | |||
836 | if (num) | 839 | if (num) |
837 | pci_bus_add_devices(bus); | 840 | pci_bus_add_devices(bus); |
838 | 841 | ||
839 | func->dev = pci_find_slot(func->busno, | 842 | func->dev = pci_get_bus_and_slot(func->busno, |
840 | PCI_DEVFN(func->device, func->function)); | 843 | PCI_DEVFN(func->device, func->function)); |
841 | if (func->dev == NULL) { | 844 | if (func->dev == NULL) { |
842 | err("ERROR... : pci_dev still NULL\n"); | 845 | err("ERROR... : pci_dev still NULL\n"); |