Skip to content

Commit

Permalink
ARM: S3C64XX: DMA: Debugged alloc's with GFP_KERNEL flag in Intr cont…
Browse files Browse the repository at this point in the history
…ext.

s3c2410_dma_enqueue makes call to kzalloc and dma_pool_alloc with GFP_KERNEL
flag set, this can be an issue for drivers, like I2S, which call
s3c2410_dma_enqueue from dma-bufferdone callback.

Change the flag GFP_KERNEL to GFP_ATOMIC to avoid any problems.

Signed-Off-by: Jassi <jassi.brar@samsung.com>
[ben-linux@fluff.org: Minor description edit and re-wrap]

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
  • Loading branch information
Jassi authored and Ben Dooks committed Sep 15, 2009
1 parent 3ea61e4 commit b93011e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/arm/plat-s3c64xx/dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -345,13 +345,13 @@ int s3c2410_dma_enqueue(unsigned int channel, void *id,
if (!chan)
return -EINVAL;

buff = kzalloc(sizeof(struct s3c64xx_dma_buff), GFP_KERNEL);
buff = kzalloc(sizeof(struct s3c64xx_dma_buff), GFP_ATOMIC);
if (!buff) {
printk(KERN_ERR "%s: no memory for buffer\n", __func__);
return -ENOMEM;
}

lli = dma_pool_alloc(dma_pool, GFP_KERNEL, &buff->lli_dma);
lli = dma_pool_alloc(dma_pool, GFP_ATOMIC, &buff->lli_dma);
if (!lli) {
printk(KERN_ERR "%s: no memory for lli\n", __func__);
ret = -ENOMEM;
Expand Down

0 comments on commit b93011e

Please sign in to comment.