diff options
| author | Takashi Iwai <[email protected]> | 2021-07-15 09:58:23 +0200 |
|---|---|---|
| committer | Takashi Iwai <[email protected]> | 2021-07-19 16:16:32 +0200 |
| commit | 427ae2689db0fb6377e39e63fae2991223cdd9e7 (patch) | |
| tree | 0fa5ba3ebbea76a54a6df1547c11dfe4a8bafa1e /tools/perf/scripts/python/bin | |
| parent | e6c0a0889b808989dc2e0f89a87c0a0adab32463 (diff) | |
ALSA: core: Add device-managed page allocator helper
This is a preparation for allowing devres usages more widely in
various sound drivers. As a first step, this patch adds a new
allocator function, snd_devm_alloc_pages(), to manage the allocated
pages via devres, so that the pages will be automagically released as
device unbinding.
Unlike the old snd_dma_alloc_pages(), the new function returns
directly the snd_dma_buffer pointer. The caller needs NULL-check for
the allocation error appropriately.
Also, since a real device pointer is mandatory for devres,
SNDRV_DMA_TYPE_CONTINUOUS or SNDRV_DMA_TYPE_VMALLOC type can't be used
for this function.
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Takashi Iwai <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/bin')
0 files changed, 0 insertions, 0 deletions