ASoC: au1x: 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>
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Lars-Peter Clausen 2015-01-02 13:56:08 +01:00 коммит произвёл Mark Brown
Родитель 97bf6af1f9
Коммит 12e29a075d
2 изменённых файлов: 0 добавлений и 12 удалений

Просмотреть файл

@ -315,11 +315,6 @@ static struct snd_pcm_ops au1xpsc_pcm_ops = {
.pointer = au1xpsc_pcm_pointer, .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) static int au1xpsc_pcm_new(struct snd_soc_pcm_runtime *rtd)
{ {
struct snd_card *card = rtd->card->snd_card; 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 = { static struct snd_soc_platform_driver au1xpsc_soc_platform = {
.ops = &au1xpsc_pcm_ops, .ops = &au1xpsc_pcm_ops,
.pcm_new = au1xpsc_pcm_new, .pcm_new = au1xpsc_pcm_new,
.pcm_free = au1xpsc_pcm_free_dma_buffers,
}; };
static int au1xpsc_pcm_drvprobe(struct platform_device *pdev) static int au1xpsc_pcm_drvprobe(struct platform_device *pdev)

Просмотреть файл

@ -287,11 +287,6 @@ static struct snd_pcm_ops alchemy_pcm_ops = {
.pointer = alchemy_pcm_pointer, .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) static int alchemy_pcm_new(struct snd_soc_pcm_runtime *rtd)
{ {
struct snd_pcm *pcm = rtd->pcm; 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 = { static struct snd_soc_platform_driver alchemy_pcm_soc_platform = {
.ops = &alchemy_pcm_ops, .ops = &alchemy_pcm_ops,
.pcm_new = alchemy_pcm_new, .pcm_new = alchemy_pcm_new,
.pcm_free = alchemy_pcm_free_dma_buffers,
}; };
static int alchemy_pcm_drvprobe(struct platform_device *pdev) static int alchemy_pcm_drvprobe(struct platform_device *pdev)