diff options
-rw-r--r-- | core.c | 11 | ||||
-rw-r--r-- | pcm.c | 4 | ||||
-rw-r--r-- | sound/avirt.h | 6 |
3 files changed, 11 insertions, 10 deletions
@@ -202,14 +202,15 @@ 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 */ -void pcm_private_data_free(struct snd_pcm *pcm) +static void pcm_private_data_free(struct snd_pcm *pcm) { struct snd_avirt_private_data *avirt_private_data; - D_PRINTK("Issuing free to private data struct"); - if(pcm->private_data){ + + D_PRINTK("Issuing free to private data struct"); + if (pcm->private_data) { avirt_private_data = pcm->private_data; - if(avirt_private_data->ap_userdata) - avirt_private_data->private_free(pcm); + if (avirt_private_data->ap_private_data) + avirt_private_data->ap_private_free(pcm); } kfree(pcm->private_data); @@ -20,8 +20,8 @@ (ap)->pcm_ops->callback((substream), ##__VA_ARGS__) : \ 0) -#define PRIVATE_DATA(substream) \ - ((struct snd_avirt_private_data *) substream->private_data) +#define PRIVATE_DATA(substream) \ + ((struct snd_avirt_private_data *)substream->private_data) /** * snd_avirt_pcm_period_elapsed - PCM buffer complete callback diff --git a/sound/avirt.h b/sound/avirt.h index 52d2404..fd4ae32 100644 --- a/sound/avirt.h +++ b/sound/avirt.h @@ -67,10 +67,10 @@ struct snd_avirt_stream { * Private Data Expansion */ struct snd_avirt_private_data { - void *audiopath; - void *ap_userdata; + struct snd_avirt_audiopath *audiopath; + void *ap_private_data; - void (*private_free)(struct snd_pcm *pcm); + void (*ap_private_free)(struct snd_pcm *pcm); }; /** |