Skip to content

Commit

Permalink
dma: make dma pool to use kmalloc_node
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Yinghai Lu authored and Linus Torvalds committed Jul 16, 2007
1 parent d375b97 commit 2618c60
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/base/dmapool.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 2618c60

Please sign in to comment.