From 2b081a6be82b6e94504730f580e40a43df530869 Mon Sep 17 00:00:00 2001 From: Siim Schults Date: Wed, 10 Sep 2025 11:55:45 +0300 Subject: [PATCH] change function calls to support kernel 6.14.0 - GIP bus match function and update PCM buffer management --- bus/bus.c | 2 +- driver/headset.c | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/bus/bus.c b/bus/bus.c index 4a6c64ff..74c4b63c 100644 --- a/bus/bus.c +++ b/bus/bus.c @@ -56,7 +56,7 @@ static struct device_type gip_client_type = { .release = gip_client_release, }; -static int gip_bus_match(struct device *dev, struct device_driver *driver) +static int gip_bus_match(struct device *dev, const struct device_driver *driver) { struct gip_client *client; struct gip_driver *drv; diff --git a/driver/headset.c b/driver/headset.c index ebee92de..9ef3a288 100644 --- a/driver/headset.c +++ b/driver/headset.c @@ -90,13 +90,12 @@ static int gip_headset_pcm_close(struct snd_pcm_substream *sub) static int gip_headset_pcm_hw_params(struct snd_pcm_substream *sub, struct snd_pcm_hw_params *params) { - return snd_pcm_lib_alloc_vmalloc_buffer(sub, - params_buffer_bytes(params)); + return snd_pcm_lib_malloc_pages(sub, params_buffer_bytes(params)); } static int gip_headset_pcm_hw_free(struct snd_pcm_substream *sub) { - return snd_pcm_lib_free_vmalloc_buffer(sub); + return snd_pcm_lib_free_pages(sub); } static int gip_headset_pcm_prepare(struct snd_pcm_substream *sub) @@ -157,7 +156,6 @@ static const struct snd_pcm_ops gip_headset_pcm_ops = { .prepare = gip_headset_pcm_prepare, .trigger = gip_headset_pcm_trigger, .pointer = gip_headset_pcm_pointer, - .page = snd_pcm_lib_get_vmalloc_page, }; static bool gip_headset_advance_pointer(struct gip_headset_stream *stream,