aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorYinghai Lu <Yinghai.Lu@Sun.COM>2007-10-17 12:04:35 -0400
committerThomas Gleixner <tglx@inhelltoy.tec.linutronix.de>2007-10-17 14:15:47 -0400
commitf6855f7fb2e22c5675d292dd445ee3c1fc09ac18 (patch)
tree7f5a205879c7038c769218146d8c409134e96e47 /arch
parent8f8ae1a7d4e7e2628cd875d0811ca5cbff012bc2 (diff)
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 <yinghai.lu@sun.com> Acked-by: Christoph Lameter <clameter@sgi.com> Cc: Christoph Lameter <clameter@sgi.com> Cc: Andy Whitcroft <apw@shadowen.org> Cc: Jeff Garzik <jeff@garzik.org> Cc: Andi Kleen <ak@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/kernel/pci-dma_64.c8
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 9576a2eb375e..b2b42bdb0a15 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)
51{ 51{
52 struct page *page; 52 struct page *page;
53 int node; 53 int node;
54#ifdef CONFIG_PCI 54
55 if (dev->bus == &pci_bus_type) 55 node = dev_to_node(dev);
56 node = pcibus_to_node(to_pci_dev(dev)->bus); 56 if (node == -1)
57 else
58#endif
59 node = numa_node_id(); 57 node = numa_node_id();
60 58
61 if (node < first_node(node_online_map)) 59 if (node < first_node(node_online_map))