PCI: hotplug: Switch to pci_get_bus_and_slot
Thank you so much for your check & advise. This time, I've tried on ibmphp_core.c, is it OK? Signed-off-by: Joonwoo Park <joonwpark81@gmail.com> Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
4348a2dc49
commit
f362b8bffe
@ -761,10 +761,13 @@ static void ibm_unconfigure_device(struct pci_func *func)
|
|||||||
debug("func->device << 3 | 0x0 = %x\n", func->device << 3 | 0x0);
|
debug("func->device << 3 | 0x0 = %x\n", func->device << 3 | 0x0);
|
||||||
|
|
||||||
for (j = 0; j < 0x08; j++) {
|
for (j = 0; j < 0x08; j++) {
|
||||||
temp = pci_find_slot(func->busno, (func->device << 3) | j);
|
temp = pci_get_bus_and_slot(func->busno, (func->device << 3) | j);
|
||||||
if (temp)
|
if (temp) {
|
||||||
pci_remove_bus_device(temp);
|
pci_remove_bus_device(temp);
|
||||||
|
pci_dev_put(temp);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
pci_dev_put(func->dev);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -823,7 +826,7 @@ static int ibm_configure_device(struct pci_func *func)
|
|||||||
if (!(bus_structure_fixup(func->busno)))
|
if (!(bus_structure_fixup(func->busno)))
|
||||||
flag = 1;
|
flag = 1;
|
||||||
if (func->dev == NULL)
|
if (func->dev == NULL)
|
||||||
func->dev = pci_find_slot(func->busno,
|
func->dev = pci_get_bus_and_slot(func->busno,
|
||||||
PCI_DEVFN(func->device, func->function));
|
PCI_DEVFN(func->device, func->function));
|
||||||
|
|
||||||
if (func->dev == NULL) {
|
if (func->dev == NULL) {
|
||||||
@ -836,7 +839,7 @@ static int ibm_configure_device(struct pci_func *func)
|
|||||||
if (num)
|
if (num)
|
||||||
pci_bus_add_devices(bus);
|
pci_bus_add_devices(bus);
|
||||||
|
|
||||||
func->dev = pci_find_slot(func->busno,
|
func->dev = pci_get_bus_and_slot(func->busno,
|
||||||
PCI_DEVFN(func->device, func->function));
|
PCI_DEVFN(func->device, func->function));
|
||||||
if (func->dev == NULL) {
|
if (func->dev == NULL) {
|
||||||
err("ERROR... : pci_dev still NULL\n");
|
err("ERROR... : pci_dev still NULL\n");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user