summaryrefslogtreecommitdiffstats
path: root/include/sound/memalloc.h
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2018-11-23 19:38:13 +0100
committerTakashi Iwai <tiwai@suse.de>2019-03-27 17:15:01 +0100
commit734b5a0bbdf43518e6739c8156a985e385e557fe (patch)
treecfadbf71e5579f10a6ae526f31923348a9007ae0 /include/sound/memalloc.h
parente42dd3ee3f9c6007c569386a8477a19d3e7503f9 (diff)
downloadlinux-734b5a0bbdf43518e6739c8156a985e385e557fe.tar.bz2
ALSA: Replace snd_malloc_pages() and snd_free_pages() with standard helpers, take#2
snd_malloc_pages() and snd_free_pages() are merely thin wrappers of the standard page allocator / free functions. Even the arguments are compatible with some standard helpers, so there is little merit of keeping these wrappers. This patch replaces the all existing callers of snd_malloc_pages() and snd_free_pages() with the direct calls of the standard helper functions. In this version, we use a recently introduced one, alloc_pages_exact(), which suits better than the old snd_malloc_pages() implementation for our purposes. Then we can avoid the waste of pages by alignment to power-of-two. Since alloc_pages_exact() does split pages, we need no longer __GFP_COMP flag; or better to say, we must not pass __GFP_COMP to alloc_pages_exact(). So the former unconditional addition of __GFP_COMP flag in snd_malloc_pages() is dropped, as well as in most other places. Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Acked-by: Michal Hocko <mhocko@suse.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'include/sound/memalloc.h')
-rw-r--r--include/sound/memalloc.h4
1 files changed, 0 insertions, 4 deletions
diff --git a/include/sound/memalloc.h b/include/sound/memalloc.h
index 1ac0dd82a916..4c6f3b5a7cff 100644
--- a/include/sound/memalloc.h
+++ b/include/sound/memalloc.h
@@ -151,9 +151,5 @@ int snd_dma_alloc_pages_fallback(int type, struct device *dev, size_t size,
struct snd_dma_buffer *dmab);
void snd_dma_free_pages(struct snd_dma_buffer *dmab);
-/* basic memory allocation functions */
-void *snd_malloc_pages(size_t size, gfp_t gfp_flags);
-void snd_free_pages(void *ptr, size_t size);
-
#endif /* __SOUND_MEMALLOC_H */