From 443bdab5db1cd5494e94aa7031c4a25e33a9c6bb Mon Sep 17 00:00:00 2001 From: Mark Farrugia Date: Fri, 1 Mar 2019 17:15:22 +1100 Subject: Refactor avirt_private_free Explicitly define callback type, refactor name Signed-off-by: Mark Farrugia --- sound/avirt.h | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) (limited to 'sound') diff --git a/sound/avirt.h b/sound/avirt.h index 6f15143..cb9a61e 100644 --- a/sound/avirt.h +++ b/sound/avirt.h @@ -65,6 +65,19 @@ struct snd_avirt_stream { struct config_item item; /* configfs item reference */ }; +/** + * Audio stream group + */ +struct snd_avirt_stream_array { + struct snd_avirt_stream *streams[MAX_STREAMS]; + int count; +}; + +/** + * snd_avirt_private_free - free Audio Path private data from function prototype + * @pcm: The PCM object + */ +typedef void (*snd_avirt_ap_private_free)(struct snd_pcm *pcm); /** * Private Data Expansion */ @@ -72,15 +85,7 @@ struct snd_avirt_private_data { struct snd_avirt_audiopath *audiopath; void *ap_private_data; - void (*ap_private_free)(struct snd_pcm *pcm); -}; - -/** - * Audio stream group - */ -struct snd_avirt_stream_array { - struct snd_avirt_stream *streams[MAX_STREAMS]; - int count; + snd_avirt_ap_private_free ap_private_free; }; /** -- cgit 1.2.3-korg