Commit f6855f7f authored by Yinghai Lu's avatar Yinghai Lu Committed by Thomas Gleixner

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: default avatarYinghai Lu <yinghai.lu@sun.com>
Acked-by: default avatarChristoph 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: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
parent 8f8ae1a7
...@@ -51,11 +51,9 @@ dma_alloc_pages(struct device *dev, gfp_t gfp, unsigned order) ...@@ -51,11 +51,9 @@ dma_alloc_pages(struct device *dev, gfp_t gfp, unsigned order)
{ {
struct page *page; struct page *page;
int node; int node;
#ifdef CONFIG_PCI
if (dev->bus == &pci_bus_type) node = dev_to_node(dev);
node = pcibus_to_node(to_pci_dev(dev)->bus); if (node == -1)
else
#endif
node = numa_node_id(); node = numa_node_id();
if (node < first_node(node_online_map)) if (node < first_node(node_online_map))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment