]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/pci/pci-driver.c
delkin_cb: use struct ide_port_info
[linux-2.6-omap-h63xx.git] / drivers / pci / pci-driver.c
index c4fa35d1dd7721d7a8288b1bcba6978b6b9412a5..72cf61ed8f966d20f99c32d6acd77424e419ee69 100644 (file)
@@ -182,17 +182,18 @@ static int pci_call_probe(struct pci_driver *drv, struct pci_dev *dev,
        struct mempolicy *oldpol;
        cpumask_t oldmask = current->cpus_allowed;
        int node = pcibus_to_node(dev->bus);
-       if (node >= 0 && node_online(node))
-           set_cpus_allowed(current, node_to_cpumask(node));
+
+       if (node >= 0) {
+               node_to_cpumask_ptr(nodecpumask, node);
+               set_cpus_allowed_ptr(current, nodecpumask);
+       }
        /* And set default memory allocation policy */
        oldpol = current->mempolicy;
-       current->mempolicy = &default_policy;
-       mpol_get(current->mempolicy);
+       current->mempolicy = NULL;      /* fall back to system default policy */
 #endif
        error = drv->probe(dev, id);
 #ifdef CONFIG_NUMA
-       set_cpus_allowed(current, oldmask);
-       mpol_free(current->mempolicy);
+       set_cpus_allowed_ptr(current, &oldmask);
        current->mempolicy = oldpol;
 #endif
        return error;
@@ -359,6 +360,8 @@ static void pci_device_shutdown(struct device *dev)
 
        if (drv && drv->shutdown)
                drv->shutdown(pci_dev);
+       pci_msi_shutdown(pci_dev);
+       pci_msix_shutdown(pci_dev);
 }
 
 /**