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 /include | |
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 'include')
-rw-r--r-- | include/sound/info.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/include/sound/info.h b/include/sound/info.h index 74f6996769c7..97ffc4fb9969 100644 --- a/include/sound/info.h +++ b/include/sound/info.h | |||
@@ -71,7 +71,6 @@ struct snd_info_entry { | |||
71 | mode_t mode; | 71 | mode_t mode; |
72 | long size; | 72 | long size; |
73 | unsigned short content; | 73 | unsigned short content; |
74 | unsigned short disconnected: 1; | ||
75 | union { | 74 | union { |
76 | struct snd_info_entry_text text; | 75 | struct snd_info_entry_text text; |
77 | struct snd_info_entry_ops *ops; | 76 | struct snd_info_entry_ops *ops; |
@@ -83,6 +82,8 @@ struct snd_info_entry { | |||
83 | void (*private_free)(struct snd_info_entry *entry); | 82 | void (*private_free)(struct snd_info_entry *entry); |
84 | struct proc_dir_entry *p; | 83 | struct proc_dir_entry *p; |
85 | struct mutex access; | 84 | struct mutex access; |
85 | struct list_head children; | ||
86 | struct list_head list; | ||
86 | }; | 87 | }; |
87 | 88 | ||
88 | #if defined(CONFIG_SND_OSSEMUL) && defined(CONFIG_PROC_FS) | 89 | #if defined(CONFIG_SND_OSSEMUL) && defined(CONFIG_PROC_FS) |
@@ -122,8 +123,8 @@ int snd_info_restore_text(struct snd_info_entry * entry); | |||
122 | int snd_info_card_create(struct snd_card * card); | 123 | int snd_info_card_create(struct snd_card * card); |
123 | int snd_info_card_register(struct snd_card * card); | 124 | int snd_info_card_register(struct snd_card * card); |
124 | int snd_info_card_free(struct snd_card * card); | 125 | int snd_info_card_free(struct snd_card * card); |
126 | void snd_info_card_disconnect(struct snd_card * card); | ||
125 | int snd_info_register(struct snd_info_entry * entry); | 127 | int snd_info_register(struct snd_info_entry * entry); |
126 | int snd_info_unregister(struct snd_info_entry * entry); | ||
127 | 128 | ||
128 | /* for card drivers */ | 129 | /* for card drivers */ |
129 | int snd_card_proc_new(struct snd_card *card, const char *name, struct snd_info_entry **entryp); | 130 | int snd_card_proc_new(struct snd_card *card, const char *name, struct snd_info_entry **entryp); |
@@ -156,8 +157,8 @@ static inline void snd_info_free_entry(struct snd_info_entry * entry) { ; } | |||
156 | static inline int snd_info_card_create(struct snd_card * card) { return 0; } | 157 | static inline int snd_info_card_create(struct snd_card * card) { return 0; } |
157 | static inline int snd_info_card_register(struct snd_card * card) { return 0; } | 158 | static inline int snd_info_card_register(struct snd_card * card) { return 0; } |
158 | static inline int snd_info_card_free(struct snd_card * card) { return 0; } | 159 | static inline int snd_info_card_free(struct snd_card * card) { return 0; } |
160 | static inline void snd_info_card_disconnect(struct snd_card * card) { } | ||
159 | static inline int snd_info_register(struct snd_info_entry * entry) { return 0; } | 161 | static inline int snd_info_register(struct snd_info_entry * entry) { return 0; } |
160 | static inline int snd_info_unregister(struct snd_info_entry * entry) { return 0; } | ||
161 | 162 | ||
162 | static inline int snd_card_proc_new(struct snd_card *card, const char *name, | 163 | static inline int snd_card_proc_new(struct snd_card *card, const char *name, |
163 | struct snd_info_entry **entryp) { return -EINVAL; } | 164 | struct snd_info_entry **entryp) { return -EINVAL; } |