]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: memalloc: Allow NULL device for SNDRV_DMA_TYPE_CONTINUOUS type
authorTakashi Iwai <tiwai@suse.de>
Tue, 5 Nov 2019 08:01:35 +0000 (09:01 +0100)
committerTakashi Iwai <tiwai@suse.de>
Wed, 6 Nov 2019 14:43:18 +0000 (15:43 +0100)
commita1649e029195f21f23687e4d0e0095e55fae5806
tree7c27ecef45eec6b22677b33a76bd14441c1c4214
parent81ee2fec27a5d8cabadffb36c72b05d0dbda79e4
ALSA: memalloc: Allow NULL device for SNDRV_DMA_TYPE_CONTINUOUS type

Currently we pass the artificial device pointer to the allocation
helper in the case of SNDRV_DMA_TYPE_CONTINUOUS for passing the GFP
flags.  But all common cases are the allocations with GFP_KERNEL, and
it's messy to put this in each place.

In this patch, the memalloc core helper is changed to accept the NULL
device pointer and it treats as the default mode, GFP_KERNEL, so that
all callers can omit the complex argument but just leave NULL.

Link: https://lore.kernel.org/r/20191105080138.1260-2-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Documentation/sound/kernel-api/writing-an-alsa-driver.rst
sound/core/memalloc.c