Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=f6855f7fb2e22c5675d292dd445ee3c1fc09ac18
Commit:     f6855f7fb2e22c5675d292dd445ee3c1fc09ac18
Parent:     8f8ae1a7d4e7e2628cd875d0811ca5cbff012bc2
Author:     Yinghai Lu <[EMAIL PROTECTED]>
AuthorDate: Wed Oct 17 18:04:35 2007 +0200
Committer:  Thomas Gleixner <[EMAIL PROTECTED]>
CommitDate: Wed Oct 17 20:15:47 2007 +0200

    x86: use dev_to_node() to get node for device in dma_alloc_pages()
    
    use dev_to_node() to get node for device in dma_alloc_pages().
    
    Signed-off-by: Yinghai Lu <[EMAIL PROTECTED]>
    Acked-by: Christoph Lameter <[EMAIL PROTECTED]>
    Cc: Christoph Lameter <[EMAIL PROTECTED]>
    Cc: Andy Whitcroft <[EMAIL PROTECTED]>
    Cc: Jeff Garzik <[EMAIL PROTECTED]>
    Cc: Andi Kleen <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Ingo Molnar <[EMAIL PROTECTED]>
    Signed-off-by: Thomas Gleixner <[EMAIL PROTECTED]>
---
 arch/x86/kernel/pci-dma_64.c |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/arch/x86/kernel/pci-dma_64.c b/arch/x86/kernel/pci-dma_64.c
index 9576a2e..b2b42bd 100644
--- a/arch/x86/kernel/pci-dma_64.c
+++ b/arch/x86/kernel/pci-dma_64.c
@@ -51,11 +51,9 @@ dma_alloc_pages(struct device *dev, gfp_t gfp, unsigned 
order)
 {
        struct page *page;
        int node;
-#ifdef CONFIG_PCI
-       if (dev->bus == &pci_bus_type)
-               node = pcibus_to_node(to_pci_dev(dev)->bus);
-       else
-#endif
+
+       node = dev_to_node(dev);
+       if (node == -1)
                node = numa_node_id();
 
        if (node < first_node(node_online_map))
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to