]> err.no Git - linux-2.6/blobdiff - drivers/pci/hotplug/ibmphp_core.c
Merge branch 'for-linus' of git://linux-nfs.org/~bfields/linux
[linux-2.6] / drivers / pci / hotplug / ibmphp_core.c
index 0316eeaaeb29cb288f45066dbf6e746610db66b1..87b6b8b280e65024fe112e06f1fe59e75a297aeb 100644 (file)
@@ -35,7 +35,7 @@
 #include <linux/delay.h>
 #include <linux/wait.h>
 #include "../pci.h"
-#include "../../../arch/i386/pci/pci.h"        /* for struct irq_routing_table */
+#include "../../../arch/x86/pci/pci.h" /* for struct irq_routing_table */
 #include "ibmphp.h"
 
 #define attn_on(sl)  ibmphp_hpc_writeslot (sl, HPC_SLOT_ATTNON)
@@ -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);
 }
 
 /*
@@ -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) {
@@ -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");