aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2015-01-02 09:03:42 -0500
committerTakashi Iwai <tiwai@suse.de>2015-01-02 10:34:47 -0500
commitef394acb45e232e940367053896708375da1ff92 (patch)
treed09fe317b2a9975bee9234024dd0e588d40c9015
parent38c4718121804317e00a3a905612d17485f754c0 (diff)
ALSA: oxygen: 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: Takashi Iwai <tiwai@suse.de>
-rw-r--r--sound/pci/oxygen/oxygen_pcm.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/sound/pci/oxygen/oxygen_pcm.c b/sound/pci/oxygen/oxygen_pcm.c
index 02828240ba15..af22a74311d7 100644
--- a/sound/pci/oxygen/oxygen_pcm.c
+++ b/sound/pci/oxygen/oxygen_pcm.c
@@ -676,11 +676,6 @@ static struct snd_pcm_ops oxygen_ac97_ops = {
676 .pointer = oxygen_pointer, 676 .pointer = oxygen_pointer,
677}; 677};
678 678
679static void oxygen_pcm_free(struct snd_pcm *pcm)
680{
681 snd_pcm_lib_preallocate_free_for_all(pcm);
682}
683
684int oxygen_pcm_init(struct oxygen *chip) 679int oxygen_pcm_init(struct oxygen *chip)
685{ 680{
686 struct snd_pcm *pcm; 681 struct snd_pcm *pcm;
@@ -705,7 +700,6 @@ int oxygen_pcm_init(struct oxygen *chip)
705 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, 700 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE,
706 &oxygen_rec_b_ops); 701 &oxygen_rec_b_ops);
707 pcm->private_data = chip; 702 pcm->private_data = chip;
708 pcm->private_free = oxygen_pcm_free;
709 strcpy(pcm->name, "Multichannel"); 703 strcpy(pcm->name, "Multichannel");
710 if (outs) 704 if (outs)
711 snd_pcm_lib_preallocate_pages(pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream, 705 snd_pcm_lib_preallocate_pages(pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream,
@@ -734,7 +728,6 @@ int oxygen_pcm_init(struct oxygen *chip)
734 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, 728 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE,
735 &oxygen_rec_c_ops); 729 &oxygen_rec_c_ops);
736 pcm->private_data = chip; 730 pcm->private_data = chip;
737 pcm->private_free = oxygen_pcm_free;
738 strcpy(pcm->name, "Digital"); 731 strcpy(pcm->name, "Digital");
739 snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV, 732 snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV,
740 snd_dma_pci_data(chip->pci), 733 snd_dma_pci_data(chip->pci),
@@ -765,7 +758,6 @@ int oxygen_pcm_init(struct oxygen *chip)
765 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, 758 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE,
766 &oxygen_rec_b_ops); 759 &oxygen_rec_b_ops);
767 pcm->private_data = chip; 760 pcm->private_data = chip;
768 pcm->private_free = oxygen_pcm_free;
769 strcpy(pcm->name, outs ? "Front Panel" : "Analog 2"); 761 strcpy(pcm->name, outs ? "Front Panel" : "Analog 2");
770 snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV, 762 snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV,
771 snd_dma_pci_data(chip->pci), 763 snd_dma_pci_data(chip->pci),