diff options
author | Takashi Iwai <tiwai@suse.de> | 2006-06-23 08:37:59 -0400 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2006-09-23 04:36:48 -0400 |
commit | 746d4a02e68499fc6c1f8d0c43d2271853ade181 (patch) | |
tree | c4a1e9a0e8f5f95a44a3349d9b86490fe837428f /sound/core/oss | |
parent | 42750b04c5baa7c5ffdf0a8be2b9b320efdf069f (diff) |
[ALSA] Fix disconnection of proc interface
- Add the linked list to each proc entry to enable a single-shot
disconnection (unregister)
- Deprecate snd_info_unregister(), use snd_info_free_entry()
- Removed NULL checks of snd_info_free_entry()
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Diffstat (limited to 'sound/core/oss')
-rw-r--r-- | sound/core/oss/mixer_oss.c | 6 | ||||
-rw-r--r-- | sound/core/oss/pcm_oss.c | 8 |
2 files changed, 5 insertions, 9 deletions
diff --git a/sound/core/oss/mixer_oss.c b/sound/core/oss/mixer_oss.c index 75a9505c7445..00c95def95aa 100644 --- a/sound/core/oss/mixer_oss.c +++ b/sound/core/oss/mixer_oss.c | |||
@@ -1193,10 +1193,8 @@ static void snd_mixer_oss_proc_init(struct snd_mixer_oss *mixer) | |||
1193 | 1193 | ||
1194 | static void snd_mixer_oss_proc_done(struct snd_mixer_oss *mixer) | 1194 | static void snd_mixer_oss_proc_done(struct snd_mixer_oss *mixer) |
1195 | { | 1195 | { |
1196 | if (mixer->proc_entry) { | 1196 | snd_info_free_entry(mixer->proc_entry); |
1197 | snd_info_unregister(mixer->proc_entry); | 1197 | mixer->proc_entry = NULL; |
1198 | mixer->proc_entry = NULL; | ||
1199 | } | ||
1200 | } | 1198 | } |
1201 | #else /* !CONFIG_PROC_FS */ | 1199 | #else /* !CONFIG_PROC_FS */ |
1202 | #define snd_mixer_oss_proc_init(mix) | 1200 | #define snd_mixer_oss_proc_init(mix) |
diff --git a/sound/core/oss/pcm_oss.c b/sound/core/oss/pcm_oss.c index 472fce0ee0e8..a92b93e5ebd5 100644 --- a/sound/core/oss/pcm_oss.c +++ b/sound/core/oss/pcm_oss.c | |||
@@ -2846,11 +2846,9 @@ static void snd_pcm_oss_proc_done(struct snd_pcm *pcm) | |||
2846 | int stream; | 2846 | int stream; |
2847 | for (stream = 0; stream < 2; ++stream) { | 2847 | for (stream = 0; stream < 2; ++stream) { |
2848 | struct snd_pcm_str *pstr = &pcm->streams[stream]; | 2848 | struct snd_pcm_str *pstr = &pcm->streams[stream]; |
2849 | if (pstr->oss.proc_entry) { | 2849 | snd_info_free_entry(pstr->oss.proc_entry); |
2850 | snd_info_unregister(pstr->oss.proc_entry); | 2850 | pstr->oss.proc_entry = NULL; |
2851 | pstr->oss.proc_entry = NULL; | 2851 | snd_pcm_oss_proc_free_setup_list(pstr); |
2852 | snd_pcm_oss_proc_free_setup_list(pstr); | ||
2853 | } | ||
2854 | } | 2852 | } |
2855 | } | 2853 | } |
2856 | #else /* !CONFIG_SND_VERBOSE_PROCFS */ | 2854 | #else /* !CONFIG_SND_VERBOSE_PROCFS */ |