Commit 0db54e74 authored by Lars-Peter Clausen's avatar Lars-Peter Clausen Committed by Mark Brown

ASoC: sh: 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: default avatarLars-Peter Clausen <lars@metafoo.de>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 97bf6af1
...@@ -305,11 +305,6 @@ static struct snd_pcm_ops camelot_pcm_ops = { ...@@ -305,11 +305,6 @@ static struct snd_pcm_ops camelot_pcm_ops = {
.pointer = camelot_pos, .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) static int camelot_pcm_new(struct snd_soc_pcm_runtime *rtd)
{ {
struct snd_pcm *pcm = rtd->pcm; struct snd_pcm *pcm = rtd->pcm;
...@@ -328,7 +323,6 @@ static int camelot_pcm_new(struct snd_soc_pcm_runtime *rtd) ...@@ -328,7 +323,6 @@ static int camelot_pcm_new(struct snd_soc_pcm_runtime *rtd)
static struct snd_soc_platform_driver sh7760_soc_platform = { static struct snd_soc_platform_driver sh7760_soc_platform = {
.ops = &camelot_pcm_ops, .ops = &camelot_pcm_ops,
.pcm_new = camelot_pcm_new, .pcm_new = camelot_pcm_new,
.pcm_free = camelot_pcm_free,
}; };
static int sh7760_soc_platform_probe(struct platform_device *pdev) static int sh7760_soc_platform_probe(struct platform_device *pdev)
......
...@@ -1765,11 +1765,6 @@ static struct snd_pcm_ops fsi_pcm_ops = { ...@@ -1765,11 +1765,6 @@ static struct snd_pcm_ops fsi_pcm_ops = {
#define PREALLOC_BUFFER (32 * 1024) #define PREALLOC_BUFFER (32 * 1024)
#define PREALLOC_BUFFER_MAX (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) static int fsi_pcm_new(struct snd_soc_pcm_runtime *rtd)
{ {
return snd_pcm_lib_preallocate_pages_for_all( return snd_pcm_lib_preallocate_pages_for_all(
...@@ -1821,7 +1816,6 @@ static struct snd_soc_dai_driver fsi_soc_dai[] = { ...@@ -1821,7 +1816,6 @@ static struct snd_soc_dai_driver fsi_soc_dai[] = {
static struct snd_soc_platform_driver fsi_soc_platform = { static struct snd_soc_platform_driver fsi_soc_platform = {
.ops = &fsi_pcm_ops, .ops = &fsi_pcm_ops,
.pcm_new = fsi_pcm_new, .pcm_new = fsi_pcm_new,
.pcm_free = fsi_pcm_free,
}; };
static const struct snd_soc_component_driver fsi_soc_component = { static const struct snd_soc_component_driver fsi_soc_component = {
......
...@@ -589,7 +589,6 @@ static void siu_pcm_free(struct snd_pcm *pcm) ...@@ -589,7 +589,6 @@ static void siu_pcm_free(struct snd_pcm *pcm)
tasklet_kill(&port_info->playback.tasklet); tasklet_kill(&port_info->playback.tasklet);
siu_free_port(port_info); siu_free_port(port_info);
snd_pcm_lib_preallocate_free_for_all(pcm);
dev_dbg(pcm->card->dev, "%s\n", __func__); dev_dbg(pcm->card->dev, "%s\n", __func__);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment