Skip to content

Commit

Permalink
ASoC: wm_adsp: Use GFP_DMA for things that may be DMAed
Browse files Browse the repository at this point in the history
Normally kmalloc() returns things that are DMA safe so not visible on all
platforms but we do need to explicitly request DMA safe memory.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
  • Loading branch information
Mark Brown committed Jan 20, 2013
1 parent 7d1f9ae commit 7881fd0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sound/soc/codecs/wm_adsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ static int wm_adsp_load(struct wm_adsp *dsp)

if (reg) {
buf = kmemdup(region->data, le32_to_cpu(region->len),
GFP_KERNEL);
GFP_KERNEL | GFP_DMA);
if (!buf) {
adsp_err(dsp, "Out of memory\n");
return -ENOMEM;
Expand Down Expand Up @@ -439,7 +439,7 @@ static int wm_adsp_load_coeff(struct wm_adsp *dsp)

if (reg) {
buf = kmemdup(blk->data, le32_to_cpu(blk->len),
GFP_KERNEL);
GFP_KERNEL | GFP_DMA);
if (!buf) {
adsp_err(dsp, "Out of memory\n");
return -ENOMEM;
Expand Down

0 comments on commit 7881fd0

Please sign in to comment.