]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/pci/pci-driver.c
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
[linux-2.6-omap-h63xx.git] / drivers / pci / pci-driver.c
index e571c72e67531017f140ee6e323e89644f7320b0..e1637bd82b8e4cc28710ed4c2f02d581155764d6 100644 (file)
@@ -181,16 +181,19 @@ static int pci_call_probe(struct pci_driver *drv, struct pci_dev *dev,
           any need to change it. */
        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));
+       int node = dev_to_node(&dev->dev);
+
+       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 = NULL;      /* fall back to system default policy */
 #endif
        error = drv->probe(dev, id);
 #ifdef CONFIG_NUMA
-       set_cpus_allowed(current, oldmask);
+       set_cpus_allowed_ptr(current, &oldmask);
        current->mempolicy = oldpol;
 #endif
        return error;
@@ -357,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);
 }
 
 /**