diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2015-01-02 07:56:09 -0500 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2015-01-06 12:24:26 -0500 |
commit | 8686f251e4823a4196bae86f22dab8cfd3b454cc (patch) | |
tree | cc2917a5a835bcf783df1eaec7bbd240f23f78a2 | |
parent | b93673be48cef887551d109683922bcc15f40d27 (diff) |
ASoC: intel: Remove unnecessary snd_pcm_lib_preallocate_free_for_all()
The ALSA core takes care that all preallocated memory is freed when the PCM
itself is freed. There is no need to do this manually in the driver.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r-- | sound/soc/intel/sst-baytrail-pcm.c | 6 | ||||
-rw-r--r-- | sound/soc/intel/sst-haswell-pcm.c | 6 | ||||
-rw-r--r-- | sound/soc/intel/sst-mfld-platform-pcm.c | 7 |
3 files changed, 0 insertions, 19 deletions
diff --git a/sound/soc/intel/sst-baytrail-pcm.c b/sound/soc/intel/sst-baytrail-pcm.c index 3bb6288d8b4d..224c49c9f135 100644 --- a/sound/soc/intel/sst-baytrail-pcm.c +++ b/sound/soc/intel/sst-baytrail-pcm.c | |||
@@ -320,11 +320,6 @@ static struct snd_pcm_ops sst_byt_pcm_ops = { | |||
320 | .mmap = sst_byt_pcm_mmap, | 320 | .mmap = sst_byt_pcm_mmap, |
321 | }; | 321 | }; |
322 | 322 | ||
323 | static void sst_byt_pcm_free(struct snd_pcm *pcm) | ||
324 | { | ||
325 | snd_pcm_lib_preallocate_free_for_all(pcm); | ||
326 | } | ||
327 | |||
328 | static int sst_byt_pcm_new(struct snd_soc_pcm_runtime *rtd) | 323 | static int sst_byt_pcm_new(struct snd_soc_pcm_runtime *rtd) |
329 | { | 324 | { |
330 | struct snd_pcm *pcm = rtd->pcm; | 325 | struct snd_pcm *pcm = rtd->pcm; |
@@ -403,7 +398,6 @@ static struct snd_soc_platform_driver byt_soc_platform = { | |||
403 | .remove = sst_byt_pcm_remove, | 398 | .remove = sst_byt_pcm_remove, |
404 | .ops = &sst_byt_pcm_ops, | 399 | .ops = &sst_byt_pcm_ops, |
405 | .pcm_new = sst_byt_pcm_new, | 400 | .pcm_new = sst_byt_pcm_new, |
406 | .pcm_free = sst_byt_pcm_free, | ||
407 | }; | 401 | }; |
408 | 402 | ||
409 | static const struct snd_soc_component_driver byt_dai_component = { | 403 | static const struct snd_soc_component_driver byt_dai_component = { |
diff --git a/sound/soc/intel/sst-haswell-pcm.c b/sound/soc/intel/sst-haswell-pcm.c index 619525200705..13f156b4a612 100644 --- a/sound/soc/intel/sst-haswell-pcm.c +++ b/sound/soc/intel/sst-haswell-pcm.c | |||
@@ -735,11 +735,6 @@ static void hsw_pcm_free_modules(struct hsw_priv_data *pdata) | |||
735 | } | 735 | } |
736 | } | 736 | } |
737 | 737 | ||
738 | static void hsw_pcm_free(struct snd_pcm *pcm) | ||
739 | { | ||
740 | snd_pcm_lib_preallocate_free_for_all(pcm); | ||
741 | } | ||
742 | |||
743 | static int hsw_pcm_new(struct snd_soc_pcm_runtime *rtd) | 738 | static int hsw_pcm_new(struct snd_soc_pcm_runtime *rtd) |
744 | { | 739 | { |
745 | struct snd_pcm *pcm = rtd->pcm; | 740 | struct snd_pcm *pcm = rtd->pcm; |
@@ -936,7 +931,6 @@ static struct snd_soc_platform_driver hsw_soc_platform = { | |||
936 | .remove = hsw_pcm_remove, | 931 | .remove = hsw_pcm_remove, |
937 | .ops = &hsw_pcm_ops, | 932 | .ops = &hsw_pcm_ops, |
938 | .pcm_new = hsw_pcm_new, | 933 | .pcm_new = hsw_pcm_new, |
939 | .pcm_free = hsw_pcm_free, | ||
940 | }; | 934 | }; |
941 | 935 | ||
942 | static const struct snd_soc_component_driver hsw_dai_component = { | 936 | static const struct snd_soc_component_driver hsw_dai_component = { |
diff --git a/sound/soc/intel/sst-mfld-platform-pcm.c b/sound/soc/intel/sst-mfld-platform-pcm.c index a1a8d9d91539..7523cbef8780 100644 --- a/sound/soc/intel/sst-mfld-platform-pcm.c +++ b/sound/soc/intel/sst-mfld-platform-pcm.c | |||
@@ -643,12 +643,6 @@ static struct snd_pcm_ops sst_platform_ops = { | |||
643 | .pointer = sst_platform_pcm_pointer, | 643 | .pointer = sst_platform_pcm_pointer, |
644 | }; | 644 | }; |
645 | 645 | ||
646 | static void sst_pcm_free(struct snd_pcm *pcm) | ||
647 | { | ||
648 | dev_dbg(pcm->dev, "sst_pcm_free called\n"); | ||
649 | snd_pcm_lib_preallocate_free_for_all(pcm); | ||
650 | } | ||
651 | |||
652 | static int sst_pcm_new(struct snd_soc_pcm_runtime *rtd) | 646 | static int sst_pcm_new(struct snd_soc_pcm_runtime *rtd) |
653 | { | 647 | { |
654 | struct snd_soc_dai *dai = rtd->cpu_dai; | 648 | struct snd_soc_dai *dai = rtd->cpu_dai; |
@@ -679,7 +673,6 @@ static struct snd_soc_platform_driver sst_soc_platform_drv = { | |||
679 | .ops = &sst_platform_ops, | 673 | .ops = &sst_platform_ops, |
680 | .compr_ops = &sst_platform_compr_ops, | 674 | .compr_ops = &sst_platform_compr_ops, |
681 | .pcm_new = sst_pcm_new, | 675 | .pcm_new = sst_pcm_new, |
682 | .pcm_free = sst_pcm_free, | ||
683 | }; | 676 | }; |
684 | 677 | ||
685 | static const struct snd_soc_component_driver sst_component = { | 678 | static const struct snd_soc_component_driver sst_component = { |