ASoC: sh: Remove unnecessary snd_pcm_lib_preallocate_free_for_all()
authorLars-Peter Clausen <lars@metafoo.de>
Fri, 2 Jan 2015 12:56:12 +0000 (13:56 +0100)
committerMark Brown <broonie@kernel.org>
Mon, 5 Jan 2015 21:30:05 +0000 (21:30 +0000)
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>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sh/dma-sh7760.c
sound/soc/sh/fsi.c
sound/soc/sh/siu_pcm.c

index a5b2c4ea90d96443f9f389f028de2a17d8fb8334..fd11404a3bc786f484774c28d64fa8c5a74c29da 100644 (file)
@@ -305,11 +305,6 @@ static struct snd_pcm_ops camelot_pcm_ops = {
        .pointer        = camelot_pos,
 };
 
-static void camelot_pcm_free(struct snd_pcm *pcm)
-{
-       snd_pcm_lib_preallocate_free_for_all(pcm);
-}
-
 static int camelot_pcm_new(struct snd_soc_pcm_runtime *rtd)
 {
        struct snd_pcm *pcm = rtd->pcm;
@@ -328,7 +323,6 @@ static int camelot_pcm_new(struct snd_soc_pcm_runtime *rtd)
 static struct snd_soc_platform_driver sh7760_soc_platform = {
        .ops            = &camelot_pcm_ops,
        .pcm_new        = camelot_pcm_new,
-       .pcm_free       = camelot_pcm_free,
 };
 
 static int sh7760_soc_platform_probe(struct platform_device *pdev)
index 8869971d7884b93e463db07bb304f23c71b3b2c3..422faa93972b5e7419db47e20c658f085379de5a 100644 (file)
@@ -1765,11 +1765,6 @@ static struct snd_pcm_ops fsi_pcm_ops = {
 #define PREALLOC_BUFFER                (32 * 1024)
 #define PREALLOC_BUFFER_MAX    (32 * 1024)
 
-static void fsi_pcm_free(struct snd_pcm *pcm)
-{
-       snd_pcm_lib_preallocate_free_for_all(pcm);
-}
-
 static int fsi_pcm_new(struct snd_soc_pcm_runtime *rtd)
 {
        return snd_pcm_lib_preallocate_pages_for_all(
@@ -1821,7 +1816,6 @@ static struct snd_soc_dai_driver fsi_soc_dai[] = {
 static struct snd_soc_platform_driver fsi_soc_platform = {
        .ops            = &fsi_pcm_ops,
        .pcm_new        = fsi_pcm_new,
-       .pcm_free       = fsi_pcm_free,
 };
 
 static const struct snd_soc_component_driver fsi_soc_component = {
index 32eb6da2d2bde2ac994aeda90ef673fbd6d6e426..82902f56e82fec8f8d9758e4b133167dca6e54ee 100644 (file)
@@ -589,7 +589,6 @@ static void siu_pcm_free(struct snd_pcm *pcm)
        tasklet_kill(&port_info->playback.tasklet);
 
        siu_free_port(port_info);
-       snd_pcm_lib_preallocate_free_for_all(pcm);
 
        dev_dbg(pcm->card->dev, "%s\n", __func__);
 }