@@ -354,5 +354,7 @@ int snd_soc_component_mmap(struct snd_soc_component *component,
struct vm_area_struct *vma);
int snd_soc_component_pcm_new(struct snd_soc_component *component,
struct snd_soc_pcm_runtime *rtd);
+void snd_soc_component_pcm_free(struct snd_soc_component *component,
+ struct snd_pcm *pcm);
#endif /* __SOC_COMPONENT_H */
@@ -412,3 +412,10 @@ int snd_soc_component_pcm_new(struct snd_soc_component *component,
return 0;
}
+
+void snd_soc_component_pcm_free(struct snd_soc_component *component,
+ struct snd_pcm *pcm)
+{
+ if (component->driver->pcm_free)
+ component->driver->pcm_free(pcm);
+}
@@ -2830,8 +2830,7 @@ static void soc_pcm_private_free(struct snd_pcm *pcm)
for_each_rtdcom(rtd, rtdcom) {
component = rtdcom->component;
- if (component->driver->pcm_free)
- component->driver->pcm_free(pcm);
+ snd_soc_component_pcm_free(component, pcm);
}
}