Browse Source

[PATCH] x86_64: Fix compilation with CONFIG_PCI=n / allnoconfig

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andi Kleen 19 years ago
parent
commit
fa47dd0ba3
1 changed files with 2 additions and 0 deletions
  1. 2 0
      arch/x86_64/kernel/pci-dma.c

+ 2 - 0
arch/x86_64/kernel/pci-dma.c

@@ -48,9 +48,11 @@ 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 = numa_node_id();
 	page = alloc_pages_node(node, gfp, order);
 	return page ? page_address(page) : NULL;