From b7d90a356a43f4609bd6290fc2e1ca4ef79d4458 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Tue, 25 Apr 2006 12:56:04 +0200 Subject: [ALSA] Fix Oops at rmmod with CONFIG_SND_VERBOSE_PROCFS=n Fixed Oops at rmmod with CONFIG_SND_VERBOSE_PROCFS=n. Add ifdef to struct fields for optimization and better compile checks. Signed-off-by: Takashi Iwai --- sound/core/pcm_memory.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'sound/core/pcm_memory.c') diff --git a/sound/core/pcm_memory.c b/sound/core/pcm_memory.c index a0119ae67dcd..428f8c169ee1 100644 --- a/sound/core/pcm_memory.c +++ b/sound/core/pcm_memory.c @@ -100,8 +100,10 @@ static void snd_pcm_lib_preallocate_dma_free(struct snd_pcm_substream *substream int snd_pcm_lib_preallocate_free(struct snd_pcm_substream *substream) { snd_pcm_lib_preallocate_dma_free(substream); +#ifdef CONFIG_SND_VERBOSE_PROCFS snd_info_unregister(substream->proc_prealloc_entry); substream->proc_prealloc_entry = NULL; +#endif return 0; } @@ -124,7 +126,7 @@ int snd_pcm_lib_preallocate_free_for_all(struct snd_pcm *pcm) return 0; } -#ifdef CONFIG_PROC_FS +#ifdef CONFIG_SND_VERBOSE_PROCFS /* * read callback for prealloc proc file * @@ -203,9 +205,9 @@ static inline void preallocate_info_init(struct snd_pcm_substream *substream) substream->proc_prealloc_entry = entry; } -#else /* !CONFIG_PROC_FS */ +#else /* !CONFIG_SND_VERBOSE_PROCFS */ #define preallocate_info_init(s) -#endif +#endif /* CONFIG_SND_VERBOSE_PROCFS */ /* * pre-allocate the buffer and create a proc file for the substream -- cgit