ASoC: au1x: Remove unnecessary snd_pcm_lib_preallocate_free_for_all()
authorLars-Peter Clausen <lars@metafoo.de>
Fri, 2 Jan 2015 12:56:08 +0000 (13:56 +0100)
committerMark Brown <broonie@kernel.org>
Mon, 5 Jan 2015 21:28:37 +0000 (21:28 +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/au1x/dbdma2.c
sound/soc/au1x/dma.c

index b06b8d8128c661d3c8645672224147164122f36e..dd94fea72d5d240cf8d6c37f344dbabe10b55e0f 100644 (file)
@@ -315,11 +315,6 @@ static struct snd_pcm_ops au1xpsc_pcm_ops = {
        .pointer        = au1xpsc_pcm_pointer,
 };
 
-static void au1xpsc_pcm_free_dma_buffers(struct snd_pcm *pcm)
-{
-       snd_pcm_lib_preallocate_free_for_all(pcm);
-}
-
 static int au1xpsc_pcm_new(struct snd_soc_pcm_runtime *rtd)
 {
        struct snd_card *card = rtd->card->snd_card;
@@ -335,7 +330,6 @@ static int au1xpsc_pcm_new(struct snd_soc_pcm_runtime *rtd)
 static struct snd_soc_platform_driver au1xpsc_soc_platform = {
        .ops            = &au1xpsc_pcm_ops,
        .pcm_new        = au1xpsc_pcm_new,
-       .pcm_free       = au1xpsc_pcm_free_dma_buffers,
 };
 
 static int au1xpsc_pcm_drvprobe(struct platform_device *pdev)
index 6ffaaff469c7d13ecc623833a14c18838486b3f0..24cc7f40d87a61ba16850a57566a395455f302f2 100644 (file)
@@ -287,11 +287,6 @@ static struct snd_pcm_ops alchemy_pcm_ops = {
        .pointer                = alchemy_pcm_pointer,
 };
 
-static void alchemy_pcm_free_dma_buffers(struct snd_pcm *pcm)
-{
-       snd_pcm_lib_preallocate_free_for_all(pcm);
-}
-
 static int alchemy_pcm_new(struct snd_soc_pcm_runtime *rtd)
 {
        struct snd_pcm *pcm = rtd->pcm;
@@ -305,7 +300,6 @@ static int alchemy_pcm_new(struct snd_soc_pcm_runtime *rtd)
 static struct snd_soc_platform_driver alchemy_pcm_soc_platform = {
        .ops            = &alchemy_pcm_ops,
        .pcm_new        = alchemy_pcm_new,
-       .pcm_free       = alchemy_pcm_free_dma_buffers,
 };
 
 static int alchemy_pcm_drvprobe(struct platform_device *pdev)