dma: make dma pool to use kmalloc_node
authorYinghai Lu <[email protected]>
Mon, 16 Jul 2007 06:41:41 +0000 (23:41 -0700)
committerLinus Torvalds <[email protected]>
Mon, 16 Jul 2007 16:05:51 +0000 (09:05 -0700)
Using dev_to_node(&dev->dev) to get node, and kmalloc_node to dma buffer on
corresponding node dma pool

Signed-off-by: Yinghai Lu <[email protected]>
Cc: Andi Kleen <[email protected]>
Cc: Christoph Lameter <[email protected]>
Cc: David Rientjes <[email protected]>
Cc: Greg KH <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
drivers/base/dmapool.c

index 91970e9bb05e3071f98346b5f378f064ec18e4b8..7647abfe189081dcec38eace34025899dd531a99 100644 (file)
@@ -127,7 +127,7 @@ dma_pool_create (const char *name, struct device *dev,
        } else if (allocation < size)
                return NULL;
 
-       if (!(retval = kmalloc (sizeof *retval, GFP_KERNEL)))
+       if (!(retval = kmalloc_node (sizeof *retval, GFP_KERNEL, dev_to_node(dev))))
                return retval;
 
        strlcpy (retval->name, name, sizeof retval->name);