Skip to content

Commit 5ced8b9

Browse files
committed
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>
1 parent 7e4d4b3 commit 5ced8b9

2 files changed

Lines changed: 11 additions & 17 deletions

File tree

sound/core/memalloc.c

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,17 @@
1717
#include <asm/set_memory.h>
1818
#endif
1919
#include <sound/memalloc.h>
20-
#include "memalloc_local.h"
20+
21+
struct snd_malloc_ops {
22+
void *(*alloc)(struct snd_dma_buffer *dmab, size_t size);
23+
void (*free)(struct snd_dma_buffer *dmab);
24+
dma_addr_t (*get_addr)(struct snd_dma_buffer *dmab, size_t offset);
25+
struct page *(*get_page)(struct snd_dma_buffer *dmab, size_t offset);
26+
unsigned int (*get_chunk_size)(struct snd_dma_buffer *dmab,
27+
unsigned int ofs, unsigned int size);
28+
int (*mmap)(struct snd_dma_buffer *dmab, struct vm_area_struct *area);
29+
void (*sync)(struct snd_dma_buffer *dmab, enum snd_dma_sync_mode mode);
30+
};
2131

2232
#define DEFAULT_GFP \
2333
(GFP_KERNEL | \

sound/core/memalloc_local.h

Lines changed: 0 additions & 16 deletions
This file was deleted.

0 commit comments

Comments
 (0)