From e28563cceb9f258ebe3c50fc27d8f4ff0ac4bfa4 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Thu, 1 Dec 2005 10:42:42 +0100 Subject: [ALSA] Optimize for config without PROC_FS Modules: HWDEP Midlevel,ALSA Core,PCM Midlevel,Timer Midlevel Optimize the code when compiled without CONFIG_PROC_FS. Signed-off-by: Takashi Iwai --- sound/core/info.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'sound/core/info.c') diff --git a/sound/core/info.c b/sound/core/info.c index ec3282f266f..ae885392146 100644 --- a/sound/core/info.c +++ b/sound/core/info.c @@ -37,6 +37,8 @@ * */ +#ifdef CONFIG_PROC_FS + int snd_info_check_reserved_words(const char *str) { static char *reserved[] = @@ -66,8 +68,6 @@ int snd_info_check_reserved_words(const char *str) return 1; } -#ifdef CONFIG_PROC_FS - static DECLARE_MUTEX(info_mutex); struct snd_info_private_data { @@ -580,12 +580,10 @@ int __exit snd_info_done(void) snd_info_version_done(); if (snd_proc_root) { #if defined(CONFIG_SND_SEQUENCER) || defined(CONFIG_SND_SEQUENCER_MODULE) - if (snd_seq_root) - snd_info_unregister(snd_seq_root); + snd_info_unregister(snd_seq_root); #endif #ifdef CONFIG_SND_OSSEMUL - if (snd_oss_root) - snd_info_unregister(snd_oss_root); + snd_info_unregister(snd_oss_root); #endif snd_remove_proc_entry(&proc_root, snd_proc_root); } @@ -937,7 +935,8 @@ int snd_info_unregister(struct snd_info_entry * entry) { struct proc_dir_entry *root; - snd_assert(entry != NULL, return -ENXIO); + if (! entry) + return 0; snd_assert(entry->p != NULL, return -ENXIO); root = entry->parent == NULL ? snd_proc_root : entry->parent->p; snd_assert(root, return -ENXIO); -- cgit v1.2.3