1 Handle snd_pcm_lib_mmap_vmalloc removal in 4.19
3 Add .mmap field back to pcm_ops for kernels older than 4.19.
5 Upstream-Status: Inappropriate
7 Signed-off-by: Scott Murray <scott.murray@konsulko.com>
9 diff --git a/aim-sound/sound.c b/aim-sound/sound.c
10 index 4b3329b..c0a26be 100644
11 --- a/aim-sound/sound.c
12 +++ b/aim-sound/sound.c
14 #include <linux/printk.h>
15 #include <linux/kernel.h>
16 #include <linux/init.h>
17 +#include <linux/version.h>
18 #include <sound/core.h>
19 #include <sound/pcm.h>
20 #include <sound/pcm_params.h>
21 @@ -463,6 +464,9 @@ static const struct snd_pcm_ops pcm_ops = {
22 .trigger = pcm_trigger,
23 .pointer = pcm_pointer,
24 .page = snd_pcm_lib_get_vmalloc_page,
25 +#if LINUX_VERSION_CODE < KERNEL_VERSION(4,19,0)
26 + .mmap = snd_pcm_lib_mmap_vmalloc,
30 static int split_arg_list(char *buf, char **card_name, u16 *ch_num,