]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
dma: make dma pool to use kmalloc_node
authorYinghai Lu <Yinghai.Lu@Sun.COM>
Mon, 16 Jul 2007 06:41:41 +0000 (23:41 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
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 <yinghai.lu@sun.com>
Cc: Andi Kleen <ak@suse.de>
Cc: Christoph Lameter <clameter@sgi.com>
Cc: David Rientjes <rientjes@google.com>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
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);