Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 07968fe4 authored by Nicolin Chen's avatar Nicolin Chen Committed by Linus Torvalds
Browse files

sound/core/memalloc.c: use gen_pool_dma_alloc() to allocate iram buffer



Since gen_pool_dma_alloc() is introduced, we implement it to simplify code.

Signed-off-by: default avatarNicolin Chen <b42378@freescale.com>
Acked-by: default avatarTakashi Iwai <tiwai@suse.de>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 0791a605
Loading
Loading
Loading
Loading
+1 −5
Original line number Diff line number Diff line
@@ -184,11 +184,7 @@ static void snd_malloc_dev_iram(struct snd_dma_buffer *dmab, size_t size)
	/* Assign the pool into private_data field */
	dmab->private_data = pool;

	dmab->area = (void *)gen_pool_alloc(pool, size);
	if (!dmab->area)
		return;

	dmab->addr = gen_pool_virt_to_phys(pool, (unsigned long)dmab->area);
	dmab->area = gen_pool_dma_alloc(pool, size, &dmab->addr);
}

/**