mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-01 10:42:11 +00:00
ALSA: memalloc: Move snd_malloc_ops definition into memalloc.c again
The definition of struct snd_malloc_ops was moved out to memalloc_local.h since there was another code for S/G buffer allocation referring to the struct. But since the code change to use non-contiguous allocators, it's solely referred in memalloc.c, hence it makes little sense to have a separate header file. Let's move it back to memalloc.c. Link: https://patch.msgid.link/20240910113141.32618-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
7e4d4b32ab
commit
5ced8b914e
@ -17,7 +17,17 @@
|
|||||||
#include <asm/set_memory.h>
|
#include <asm/set_memory.h>
|
||||||
#endif
|
#endif
|
||||||
#include <sound/memalloc.h>
|
#include <sound/memalloc.h>
|
||||||
#include "memalloc_local.h"
|
|
||||||
|
struct snd_malloc_ops {
|
||||||
|
void *(*alloc)(struct snd_dma_buffer *dmab, size_t size);
|
||||||
|
void (*free)(struct snd_dma_buffer *dmab);
|
||||||
|
dma_addr_t (*get_addr)(struct snd_dma_buffer *dmab, size_t offset);
|
||||||
|
struct page *(*get_page)(struct snd_dma_buffer *dmab, size_t offset);
|
||||||
|
unsigned int (*get_chunk_size)(struct snd_dma_buffer *dmab,
|
||||||
|
unsigned int ofs, unsigned int size);
|
||||||
|
int (*mmap)(struct snd_dma_buffer *dmab, struct vm_area_struct *area);
|
||||||
|
void (*sync)(struct snd_dma_buffer *dmab, enum snd_dma_sync_mode mode);
|
||||||
|
};
|
||||||
|
|
||||||
#define DEFAULT_GFP \
|
#define DEFAULT_GFP \
|
||||||
(GFP_KERNEL | \
|
(GFP_KERNEL | \
|
||||||
|
@ -1,16 +0,0 @@
|
|||||||
// SPDX-License-Identifier: GPL-2.0-only
|
|
||||||
#ifndef __MEMALLOC_LOCAL_H
|
|
||||||
#define __MEMALLOC_LOCAL_H
|
|
||||||
|
|
||||||
struct snd_malloc_ops {
|
|
||||||
void *(*alloc)(struct snd_dma_buffer *dmab, size_t size);
|
|
||||||
void (*free)(struct snd_dma_buffer *dmab);
|
|
||||||
dma_addr_t (*get_addr)(struct snd_dma_buffer *dmab, size_t offset);
|
|
||||||
struct page *(*get_page)(struct snd_dma_buffer *dmab, size_t offset);
|
|
||||||
unsigned int (*get_chunk_size)(struct snd_dma_buffer *dmab,
|
|
||||||
unsigned int ofs, unsigned int size);
|
|
||||||
int (*mmap)(struct snd_dma_buffer *dmab, struct vm_area_struct *area);
|
|
||||||
void (*sync)(struct snd_dma_buffer *dmab, enum snd_dma_sync_mode mode);
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif /* __MEMALLOC_LOCAL_H */
|
|
Loading…
Reference in New Issue
Block a user