summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core.c11
-rw-r--r--pcm.c4
-rw-r--r--sound/avirt.h6
3 files changed, 11 insertions, 10 deletions
diff --git a/core.c b/core.c
index a99f82a..f3b33d1 100644
--- a/core.c
+++ b/core.c
@@ -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);
diff --git a/pcm.c b/pcm.c
index 73f87c9..509eae7 100644
--- a/pcm.c
+++ b/pcm.c
@@ -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);
};
/**