diff options
Diffstat (limited to 'sound/core/info.c')
-rw-r--r-- | sound/core/info.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/sound/core/info.c b/sound/core/info.c index ec3282f266f0..ae8853921464 100644 --- a/sound/core/info.c +++ b/sound/core/info.c | |||
@@ -37,6 +37,8 @@ | |||
37 | * | 37 | * |
38 | */ | 38 | */ |
39 | 39 | ||
40 | #ifdef CONFIG_PROC_FS | ||
41 | |||
40 | int snd_info_check_reserved_words(const char *str) | 42 | int snd_info_check_reserved_words(const char *str) |
41 | { | 43 | { |
42 | static char *reserved[] = | 44 | static char *reserved[] = |
@@ -66,8 +68,6 @@ int snd_info_check_reserved_words(const char *str) | |||
66 | return 1; | 68 | return 1; |
67 | } | 69 | } |
68 | 70 | ||
69 | #ifdef CONFIG_PROC_FS | ||
70 | |||
71 | static DECLARE_MUTEX(info_mutex); | 71 | static DECLARE_MUTEX(info_mutex); |
72 | 72 | ||
73 | struct snd_info_private_data { | 73 | struct snd_info_private_data { |
@@ -580,12 +580,10 @@ int __exit snd_info_done(void) | |||
580 | snd_info_version_done(); | 580 | snd_info_version_done(); |
581 | if (snd_proc_root) { | 581 | if (snd_proc_root) { |
582 | #if defined(CONFIG_SND_SEQUENCER) || defined(CONFIG_SND_SEQUENCER_MODULE) | 582 | #if defined(CONFIG_SND_SEQUENCER) || defined(CONFIG_SND_SEQUENCER_MODULE) |
583 | if (snd_seq_root) | 583 | snd_info_unregister(snd_seq_root); |
584 | snd_info_unregister(snd_seq_root); | ||
585 | #endif | 584 | #endif |
586 | #ifdef CONFIG_SND_OSSEMUL | 585 | #ifdef CONFIG_SND_OSSEMUL |
587 | if (snd_oss_root) | 586 | snd_info_unregister(snd_oss_root); |
588 | snd_info_unregister(snd_oss_root); | ||
589 | #endif | 587 | #endif |
590 | snd_remove_proc_entry(&proc_root, snd_proc_root); | 588 | snd_remove_proc_entry(&proc_root, snd_proc_root); |
591 | } | 589 | } |
@@ -937,7 +935,8 @@ int snd_info_unregister(struct snd_info_entry * entry) | |||
937 | { | 935 | { |
938 | struct proc_dir_entry *root; | 936 | struct proc_dir_entry *root; |
939 | 937 | ||
940 | snd_assert(entry != NULL, return -ENXIO); | 938 | if (! entry) |
939 | return 0; | ||
941 | snd_assert(entry->p != NULL, return -ENXIO); | 940 | snd_assert(entry->p != NULL, return -ENXIO); |
942 | root = entry->parent == NULL ? snd_proc_root : entry->parent->p; | 941 | root = entry->parent == NULL ? snd_proc_root : entry->parent->p; |
943 | snd_assert(root, return -ENXIO); | 942 | snd_assert(root, return -ENXIO); |