Skip to content

Commit

Permalink
PCI: hotplug: Switch to pci_get_bus_and_slot
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Joonwoo Park authored and Greg Kroah-Hartman committed Feb 1, 2008
1 parent 4348a2d commit f362b8b
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions drivers/pci/hotplug/ibmphp_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -761,10 +761,13 @@ static void ibm_unconfigure_device(struct pci_func *func)
debug("func->device << 3 | 0x0 = %x\n", func->device << 3 | 0x0);

for (j = 0; j < 0x08; j++) {
temp = pci_find_slot(func->busno, (func->device << 3) | j);
if (temp)
temp = pci_get_bus_and_slot(func->busno, (func->device << 3) | j);
if (temp) {
pci_remove_bus_device(temp);
pci_dev_put(temp);
}
}
pci_dev_put(func->dev);
}

/*
Expand Down Expand Up @@ -823,7 +826,7 @@ static int ibm_configure_device(struct pci_func *func)
if (!(bus_structure_fixup(func->busno)))
flag = 1;
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));

if (func->dev == NULL) {
Expand All @@ -836,7 +839,7 @@ static int ibm_configure_device(struct pci_func *func)
if (num)
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));
if (func->dev == NULL) {
err("ERROR... : pci_dev still NULL\n");
Expand Down

0 comments on commit f362b8b

Please sign in to comment.