diff options
author | Mark Farrugia <mark.farrugia@fiberdyne.com.au> | 2019-03-01 17:15:22 +1100 |
---|---|---|
committer | Mark Farrugia <mark.farrugia@fiberdyne.com.au> | 2019-03-05 10:33:28 +1100 |
commit | 9dc9e5314bb53dd1591132e643fe35df237d5a19 (patch) | |
tree | d79f6655a4b23fcea59727b3c0c847b676b59317 /core.c | |
parent | e53ee4684ebff1d8ef22ee67474c678054938c47 (diff) |
Refactor avirt_private_free
Explicitly define callback type, refactor name
Signed-off-by: Mark Farrugia <mark.farrugia@fiberdyne.com.au>
Diffstat (limited to 'core.c')
-rw-r--r-- | core.c | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -203,13 +203,14 @@ static void destroy_snd_avirt_audiopath_obj(struct snd_avirt_audiopath_obj *p) } /** - * pcm_private_data_free - callback function to free private data allocated to pcm - * @pcm: the PCM with private data + * pcm_private_free - callback function to free private data allocated to pcm + * @pcm: the PCM object */ -static void pcm_private_data_free(struct snd_pcm *pcm) +static void pcm_private_free(struct snd_pcm *pcm) { struct snd_avirt_private_data *avirt_private_data; + /* Free Audio Path private data */ avirt_private_data = (struct snd_avirt_private_data *)pcm->private_data; if (avirt_private_data) { if (avirt_private_data->ap_private_data && @@ -260,7 +261,7 @@ static struct snd_pcm *snd_avirt_pcm_create(struct snd_avirt_stream *stream) avirt_private_data = kzalloc(sizeof(*avirt_private_data), GFP_KERNEL); pcm->private_data = avirt_private_data; // Set the private free function for the private user data - pcm->private_free = pcm_private_data_free; + pcm->private_free = pcm_private_free; snd_device_register(core.card, pcm); |