aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorxingchao <xingchao.wang@intel.com>2011-04-27 16:58:54 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2011-05-03 18:29:54 -0400
commit9ab88434e8b5ffc5a638b5b1d3b9a67dceb28e5d (patch)
treed6b393aa6c5af111aa6cdde1ee58d7c1fccf0ad7
parented77cc122a8402db8f9c3492649aa0c3fee7b385 (diff)
ASoC: sst_platform: add hw_free callback to fix resource leak
Signed-off-by: xingchao <xingchao.wang@intel.com> Acked-by: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
-rw-r--r--sound/soc/mid-x86/sst_platform.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sound/soc/mid-x86/sst_platform.c b/sound/soc/mid-x86/sst_platform.c
index d567c322a2fb..6b1f9d3bf34e 100644
--- a/sound/soc/mid-x86/sst_platform.c
+++ b/sound/soc/mid-x86/sst_platform.c
@@ -376,6 +376,11 @@ static int sst_platform_pcm_hw_params(struct snd_pcm_substream *substream,
376 return 0; 376 return 0;
377} 377}
378 378
379static int sst_platform_pcm_hw_free(struct snd_pcm_substream *substream)
380{
381 return snd_pcm_lib_free_pages(substream);
382}
383
379static struct snd_pcm_ops sst_platform_ops = { 384static struct snd_pcm_ops sst_platform_ops = {
380 .open = sst_platform_open, 385 .open = sst_platform_open,
381 .close = sst_platform_close, 386 .close = sst_platform_close,
@@ -384,6 +389,7 @@ static struct snd_pcm_ops sst_platform_ops = {
384 .trigger = sst_platform_pcm_trigger, 389 .trigger = sst_platform_pcm_trigger,
385 .pointer = sst_platform_pcm_pointer, 390 .pointer = sst_platform_pcm_pointer,
386 .hw_params = sst_platform_pcm_hw_params, 391 .hw_params = sst_platform_pcm_hw_params,
392 .hw_free = sst_platform_pcm_hw_free,
387}; 393};
388 394
389static void sst_pcm_free(struct snd_pcm *pcm) 395static void sst_pcm_free(struct snd_pcm *pcm)