diff options
-rw-r--r-- | include/sound/info.h | 94 | ||||
-rw-r--r-- | sound/core/info.c | 110 |
2 files changed, 101 insertions, 103 deletions
diff --git a/include/sound/info.h b/include/sound/info.h index 1d76bf3cb05e..df03e6017547 100644 --- a/include/sound/info.h +++ b/include/sound/info.h | |||
@@ -34,8 +34,6 @@ struct snd_info_buffer { | |||
34 | int error; /* error code */ | 34 | int error; /* error code */ |
35 | }; | 35 | }; |
36 | 36 | ||
37 | typedef struct snd_info_buffer snd_info_buffer_t; | ||
38 | |||
39 | #define SNDRV_INFO_CONTENT_TEXT 0 | 37 | #define SNDRV_INFO_CONTENT_TEXT 0 |
40 | #define SNDRV_INFO_CONTENT_DATA 1 | 38 | #define SNDRV_INFO_CONTENT_DATA 1 |
41 | 39 | ||
@@ -44,28 +42,28 @@ struct snd_info_entry; | |||
44 | struct snd_info_entry_text { | 42 | struct snd_info_entry_text { |
45 | unsigned long read_size; | 43 | unsigned long read_size; |
46 | unsigned long write_size; | 44 | unsigned long write_size; |
47 | void (*read) (snd_info_entry_t *entry, snd_info_buffer_t * buffer); | 45 | void (*read) (struct snd_info_entry *entry, struct snd_info_buffer *buffer); |
48 | void (*write) (snd_info_entry_t *entry, snd_info_buffer_t * buffer); | 46 | void (*write) (struct snd_info_entry *entry, struct snd_info_buffer *buffer); |
49 | }; | 47 | }; |
50 | 48 | ||
51 | struct snd_info_entry_ops { | 49 | struct snd_info_entry_ops { |
52 | int (*open) (snd_info_entry_t *entry, | 50 | int (*open) (struct snd_info_entry *entry, |
53 | unsigned short mode, void **file_private_data); | 51 | unsigned short mode, void **file_private_data); |
54 | int (*release) (snd_info_entry_t * entry, | 52 | int (*release) (struct snd_info_entry * entry, |
55 | unsigned short mode, void *file_private_data); | 53 | unsigned short mode, void *file_private_data); |
56 | long (*read) (snd_info_entry_t *entry, void *file_private_data, | 54 | long (*read) (struct snd_info_entry *entry, void *file_private_data, |
57 | struct file * file, char __user *buf, | 55 | struct file * file, char __user *buf, |
58 | unsigned long count, unsigned long pos); | 56 | unsigned long count, unsigned long pos); |
59 | long (*write) (snd_info_entry_t *entry, void *file_private_data, | 57 | long (*write) (struct snd_info_entry *entry, void *file_private_data, |
60 | struct file * file, const char __user *buf, | 58 | struct file * file, const char __user *buf, |
61 | unsigned long count, unsigned long pos); | 59 | unsigned long count, unsigned long pos); |
62 | long long (*llseek) (snd_info_entry_t *entry, void *file_private_data, | 60 | long long (*llseek) (struct snd_info_entry *entry, void *file_private_data, |
63 | struct file * file, long long offset, int orig); | 61 | struct file * file, long long offset, int orig); |
64 | unsigned int (*poll) (snd_info_entry_t *entry, void *file_private_data, | 62 | unsigned int (*poll) (struct snd_info_entry *entry, void *file_private_data, |
65 | struct file * file, poll_table * wait); | 63 | struct file * file, poll_table * wait); |
66 | int (*ioctl) (snd_info_entry_t *entry, void *file_private_data, | 64 | int (*ioctl) (struct snd_info_entry *entry, void *file_private_data, |
67 | struct file * file, unsigned int cmd, unsigned long arg); | 65 | struct file * file, unsigned int cmd, unsigned long arg); |
68 | int (*mmap) (snd_info_entry_t *entry, void *file_private_data, | 66 | int (*mmap) (struct snd_info_entry *entry, void *file_private_data, |
69 | struct inode * inode, struct file * file, | 67 | struct inode * inode, struct file * file, |
70 | struct vm_area_struct * vma); | 68 | struct vm_area_struct * vma); |
71 | }; | 69 | }; |
@@ -80,20 +78,20 @@ struct snd_info_entry { | |||
80 | struct snd_info_entry_text text; | 78 | struct snd_info_entry_text text; |
81 | struct snd_info_entry_ops *ops; | 79 | struct snd_info_entry_ops *ops; |
82 | } c; | 80 | } c; |
83 | snd_info_entry_t *parent; | 81 | struct snd_info_entry *parent; |
84 | snd_card_t *card; | 82 | struct snd_card *card; |
85 | struct module *module; | 83 | struct module *module; |
86 | void *private_data; | 84 | void *private_data; |
87 | void (*private_free)(snd_info_entry_t *entry); | 85 | void (*private_free)(struct snd_info_entry *entry); |
88 | struct proc_dir_entry *p; | 86 | struct proc_dir_entry *p; |
89 | struct semaphore access; | 87 | struct semaphore access; |
90 | }; | 88 | }; |
91 | 89 | ||
92 | extern int snd_info_check_reserved_words(const char *str); | 90 | int snd_info_check_reserved_words(const char *str); |
93 | 91 | ||
94 | #if defined(CONFIG_SND_OSSEMUL) && defined(CONFIG_PROC_FS) | 92 | #if defined(CONFIG_SND_OSSEMUL) && defined(CONFIG_PROC_FS) |
95 | extern int snd_info_minor_register(void); | 93 | int snd_info_minor_register(void); |
96 | extern int snd_info_minor_unregister(void); | 94 | int snd_info_minor_unregister(void); |
97 | #else | 95 | #else |
98 | #define snd_info_minor_register() /* NOP */ | 96 | #define snd_info_minor_register() /* NOP */ |
99 | #define snd_info_minor_unregister() /* NOP */ | 97 | #define snd_info_minor_unregister() /* NOP */ |
@@ -102,42 +100,42 @@ extern int snd_info_minor_unregister(void); | |||
102 | 100 | ||
103 | #ifdef CONFIG_PROC_FS | 101 | #ifdef CONFIG_PROC_FS |
104 | 102 | ||
105 | extern snd_info_entry_t *snd_seq_root; | 103 | extern struct snd_info_entry *snd_seq_root; |
106 | #ifdef CONFIG_SND_OSSEMUL | 104 | #ifdef CONFIG_SND_OSSEMUL |
107 | extern snd_info_entry_t *snd_oss_root; | 105 | extern struct snd_info_entry *snd_oss_root; |
108 | #else | 106 | #else |
109 | #define snd_oss_root NULL | 107 | #define snd_oss_root NULL |
110 | #endif | 108 | #endif |
111 | 109 | ||
112 | int snd_iprintf(snd_info_buffer_t * buffer, char *fmt,...) __attribute__ ((format (printf, 2, 3))); | 110 | int snd_iprintf(struct snd_info_buffer * buffer, char *fmt,...) __attribute__ ((format (printf, 2, 3))); |
113 | int snd_info_init(void); | 111 | int snd_info_init(void); |
114 | int snd_info_done(void); | 112 | int snd_info_done(void); |
115 | 113 | ||
116 | int snd_info_get_line(snd_info_buffer_t * buffer, char *line, int len); | 114 | int snd_info_get_line(struct snd_info_buffer * buffer, char *line, int len); |
117 | char *snd_info_get_str(char *dest, char *src, int len); | 115 | char *snd_info_get_str(char *dest, char *src, int len); |
118 | snd_info_entry_t *snd_info_create_module_entry(struct module * module, | 116 | struct snd_info_entry *snd_info_create_module_entry(struct module * module, |
119 | const char *name, | 117 | const char *name, |
120 | snd_info_entry_t * parent); | 118 | struct snd_info_entry * parent); |
121 | snd_info_entry_t *snd_info_create_card_entry(snd_card_t * card, | 119 | struct snd_info_entry *snd_info_create_card_entry(struct snd_card * card, |
122 | const char *name, | 120 | const char *name, |
123 | snd_info_entry_t * parent); | 121 | struct snd_info_entry * parent); |
124 | void snd_info_free_entry(snd_info_entry_t * entry); | 122 | void snd_info_free_entry(struct snd_info_entry * entry); |
125 | int snd_info_store_text(snd_info_entry_t * entry); | 123 | int snd_info_store_text(struct snd_info_entry * entry); |
126 | int snd_info_restore_text(snd_info_entry_t * entry); | 124 | int snd_info_restore_text(struct snd_info_entry * entry); |
127 | 125 | ||
128 | int snd_info_card_create(snd_card_t * card); | 126 | int snd_info_card_create(struct snd_card * card); |
129 | int snd_info_card_register(snd_card_t * card); | 127 | int snd_info_card_register(struct snd_card * card); |
130 | int snd_info_card_free(snd_card_t * card); | 128 | int snd_info_card_free(struct snd_card * card); |
131 | int snd_info_register(snd_info_entry_t * entry); | 129 | int snd_info_register(struct snd_info_entry * entry); |
132 | int snd_info_unregister(snd_info_entry_t * entry); | 130 | int snd_info_unregister(struct snd_info_entry * entry); |
133 | 131 | ||
134 | /* for card drivers */ | 132 | /* for card drivers */ |
135 | int snd_card_proc_new(snd_card_t *card, const char *name, snd_info_entry_t **entryp); | 133 | int snd_card_proc_new(struct snd_card *card, const char *name, struct snd_info_entry **entryp); |
136 | 134 | ||
137 | static inline void snd_info_set_text_ops(snd_info_entry_t *entry, | 135 | static inline void snd_info_set_text_ops(struct snd_info_entry *entry, |
138 | void *private_data, | 136 | void *private_data, |
139 | long read_size, | 137 | long read_size, |
140 | void (*read)(snd_info_entry_t *, snd_info_buffer_t *)) | 138 | void (*read)(struct snd_info_entry *, struct snd_info_buffer *)) |
141 | { | 139 | { |
142 | entry->private_data = private_data; | 140 | entry->private_data = private_data; |
143 | entry->c.text.read_size = read_size; | 141 | entry->c.text.read_size = read_size; |
@@ -150,21 +148,21 @@ static inline void snd_info_set_text_ops(snd_info_entry_t *entry, | |||
150 | #define snd_seq_root NULL | 148 | #define snd_seq_root NULL |
151 | #define snd_oss_root NULL | 149 | #define snd_oss_root NULL |
152 | 150 | ||
153 | static inline int snd_iprintf(snd_info_buffer_t * buffer, char *fmt,...) { return 0; } | 151 | static inline int snd_iprintf(struct snd_info_buffer * buffer, char *fmt,...) { return 0; } |
154 | static inline int snd_info_init(void) { return 0; } | 152 | static inline int snd_info_init(void) { return 0; } |
155 | static inline int snd_info_done(void) { return 0; } | 153 | static inline int snd_info_done(void) { return 0; } |
156 | 154 | ||
157 | static inline int snd_info_get_line(snd_info_buffer_t * buffer, char *line, int len) { return 0; } | 155 | static inline int snd_info_get_line(struct snd_info_buffer * buffer, char *line, int len) { return 0; } |
158 | static inline char *snd_info_get_str(char *dest, char *src, int len) { return NULL; } | 156 | static inline char *snd_info_get_str(char *dest, char *src, int len) { return NULL; } |
159 | static inline snd_info_entry_t *snd_info_create_module_entry(struct module * module, const char *name, snd_info_entry_t * parent) { return NULL; } | 157 | static inline struct snd_info_entry *snd_info_create_module_entry(struct module * module, const char *name, struct snd_info_entry * parent) { return NULL; } |
160 | static inline snd_info_entry_t *snd_info_create_card_entry(snd_card_t * card, const char *name, snd_info_entry_t * parent) { return NULL; } | 158 | static inline struct snd_info_entry *snd_info_create_card_entry(struct snd_card * card, const char *name, struct snd_info_entry * parent) { return NULL; } |
161 | static inline void snd_info_free_entry(snd_info_entry_t * entry) { ; } | 159 | static inline void snd_info_free_entry(struct snd_info_entry * entry) { ; } |
162 | 160 | ||
163 | static inline int snd_info_card_create(snd_card_t * card) { return 0; } | 161 | static inline int snd_info_card_create(struct snd_card * card) { return 0; } |
164 | static inline int snd_info_card_register(snd_card_t * card) { return 0; } | 162 | static inline int snd_info_card_register(struct snd_card * card) { return 0; } |
165 | static inline int snd_info_card_free(snd_card_t * card) { return 0; } | 163 | static inline int snd_info_card_free(struct snd_card * card) { return 0; } |
166 | static inline int snd_info_register(snd_info_entry_t * entry) { return 0; } | 164 | static inline int snd_info_register(struct snd_info_entry * entry) { return 0; } |
167 | static inline int snd_info_unregister(snd_info_entry_t * entry) { return 0; } | 165 | static inline int snd_info_unregister(struct snd_info_entry * entry) { return 0; } |
168 | 166 | ||
169 | #define snd_card_proc_new(card,name,entryp) 0 /* always success */ | 167 | #define snd_card_proc_new(card,name,entryp) 0 /* always success */ |
170 | #define snd_info_set_text_ops(entry,private_data,read_size,read) /*NOP*/ | 168 | #define snd_info_set_text_ops(entry,private_data,read_size,read) /*NOP*/ |
@@ -185,7 +183,7 @@ static inline int snd_info_unregister(snd_info_entry_t * entry) { return 0; } | |||
185 | 183 | ||
186 | #define SNDRV_OSS_INFO_DEV_COUNT 6 | 184 | #define SNDRV_OSS_INFO_DEV_COUNT 6 |
187 | 185 | ||
188 | extern int snd_oss_info_register(int dev, int num, char *string); | 186 | int snd_oss_info_register(int dev, int num, char *string); |
189 | #define snd_oss_info_unregister(dev, num) snd_oss_info_register(dev, num, NULL) | 187 | #define snd_oss_info_unregister(dev, num) snd_oss_info_register(dev, num, NULL) |
190 | 188 | ||
191 | #endif /* CONFIG_SND_OSSEMUL && CONFIG_PROC_FS */ | 189 | #endif /* CONFIG_SND_OSSEMUL && CONFIG_PROC_FS */ |
diff --git a/sound/core/info.c b/sound/core/info.c index 39f9b97d9219..ec3282f266f0 100644 --- a/sound/core/info.c +++ b/sound/core/info.c | |||
@@ -70,12 +70,12 @@ int snd_info_check_reserved_words(const char *str) | |||
70 | 70 | ||
71 | static DECLARE_MUTEX(info_mutex); | 71 | static DECLARE_MUTEX(info_mutex); |
72 | 72 | ||
73 | typedef struct _snd_info_private_data { | 73 | struct snd_info_private_data { |
74 | snd_info_buffer_t *rbuffer; | 74 | struct snd_info_buffer *rbuffer; |
75 | snd_info_buffer_t *wbuffer; | 75 | struct snd_info_buffer *wbuffer; |
76 | snd_info_entry_t *entry; | 76 | struct snd_info_entry *entry; |
77 | void *file_private_data; | 77 | void *file_private_data; |
78 | } snd_info_private_data_t; | 78 | }; |
79 | 79 | ||
80 | static int snd_info_version_init(void); | 80 | static int snd_info_version_init(void); |
81 | static int snd_info_version_done(void); | 81 | static int snd_info_version_done(void); |
@@ -90,7 +90,7 @@ static int snd_info_version_done(void); | |||
90 | * | 90 | * |
91 | * Returns the size of output string. | 91 | * Returns the size of output string. |
92 | */ | 92 | */ |
93 | int snd_iprintf(snd_info_buffer_t * buffer, char *fmt,...) | 93 | int snd_iprintf(struct snd_info_buffer *buffer, char *fmt,...) |
94 | { | 94 | { |
95 | va_list args; | 95 | va_list args; |
96 | int len, res; | 96 | int len, res; |
@@ -115,9 +115,9 @@ int snd_iprintf(snd_info_buffer_t * buffer, char *fmt,...) | |||
115 | */ | 115 | */ |
116 | 116 | ||
117 | static struct proc_dir_entry *snd_proc_root = NULL; | 117 | static struct proc_dir_entry *snd_proc_root = NULL; |
118 | snd_info_entry_t *snd_seq_root = NULL; | 118 | struct snd_info_entry *snd_seq_root = NULL; |
119 | #ifdef CONFIG_SND_OSSEMUL | 119 | #ifdef CONFIG_SND_OSSEMUL |
120 | snd_info_entry_t *snd_oss_root = NULL; | 120 | struct snd_info_entry *snd_oss_root = NULL; |
121 | #endif | 121 | #endif |
122 | 122 | ||
123 | static inline void snd_info_entry_prepare(struct proc_dir_entry *de) | 123 | static inline void snd_info_entry_prepare(struct proc_dir_entry *de) |
@@ -134,7 +134,7 @@ static void snd_remove_proc_entry(struct proc_dir_entry *parent, | |||
134 | 134 | ||
135 | static loff_t snd_info_entry_llseek(struct file *file, loff_t offset, int orig) | 135 | static loff_t snd_info_entry_llseek(struct file *file, loff_t offset, int orig) |
136 | { | 136 | { |
137 | snd_info_private_data_t *data; | 137 | struct snd_info_private_data *data; |
138 | struct snd_info_entry *entry; | 138 | struct snd_info_entry *entry; |
139 | loff_t ret; | 139 | loff_t ret; |
140 | 140 | ||
@@ -176,9 +176,9 @@ out: | |||
176 | static ssize_t snd_info_entry_read(struct file *file, char __user *buffer, | 176 | static ssize_t snd_info_entry_read(struct file *file, char __user *buffer, |
177 | size_t count, loff_t * offset) | 177 | size_t count, loff_t * offset) |
178 | { | 178 | { |
179 | snd_info_private_data_t *data; | 179 | struct snd_info_private_data *data; |
180 | struct snd_info_entry *entry; | 180 | struct snd_info_entry *entry; |
181 | snd_info_buffer_t *buf; | 181 | struct snd_info_buffer *buf; |
182 | size_t size = 0; | 182 | size_t size = 0; |
183 | loff_t pos; | 183 | loff_t pos; |
184 | 184 | ||
@@ -217,9 +217,9 @@ static ssize_t snd_info_entry_read(struct file *file, char __user *buffer, | |||
217 | static ssize_t snd_info_entry_write(struct file *file, const char __user *buffer, | 217 | static ssize_t snd_info_entry_write(struct file *file, const char __user *buffer, |
218 | size_t count, loff_t * offset) | 218 | size_t count, loff_t * offset) |
219 | { | 219 | { |
220 | snd_info_private_data_t *data; | 220 | struct snd_info_private_data *data; |
221 | struct snd_info_entry *entry; | 221 | struct snd_info_entry *entry; |
222 | snd_info_buffer_t *buf; | 222 | struct snd_info_buffer *buf; |
223 | size_t size = 0; | 223 | size_t size = 0; |
224 | loff_t pos; | 224 | loff_t pos; |
225 | 225 | ||
@@ -259,15 +259,15 @@ static ssize_t snd_info_entry_write(struct file *file, const char __user *buffer | |||
259 | 259 | ||
260 | static int snd_info_entry_open(struct inode *inode, struct file *file) | 260 | static int snd_info_entry_open(struct inode *inode, struct file *file) |
261 | { | 261 | { |
262 | snd_info_entry_t *entry; | 262 | struct snd_info_entry *entry; |
263 | snd_info_private_data_t *data; | 263 | struct snd_info_private_data *data; |
264 | snd_info_buffer_t *buffer; | 264 | struct snd_info_buffer *buffer; |
265 | struct proc_dir_entry *p; | 265 | struct proc_dir_entry *p; |
266 | int mode, err; | 266 | int mode, err; |
267 | 267 | ||
268 | down(&info_mutex); | 268 | down(&info_mutex); |
269 | p = PDE(inode); | 269 | p = PDE(inode); |
270 | entry = p == NULL ? NULL : (snd_info_entry_t *)p->data; | 270 | entry = p == NULL ? NULL : (struct snd_info_entry *)p->data; |
271 | if (entry == NULL || entry->disconnected) { | 271 | if (entry == NULL || entry->disconnected) { |
272 | up(&info_mutex); | 272 | up(&info_mutex); |
273 | return -ENODEV; | 273 | return -ENODEV; |
@@ -381,8 +381,8 @@ static int snd_info_entry_open(struct inode *inode, struct file *file) | |||
381 | 381 | ||
382 | static int snd_info_entry_release(struct inode *inode, struct file *file) | 382 | static int snd_info_entry_release(struct inode *inode, struct file *file) |
383 | { | 383 | { |
384 | snd_info_entry_t *entry; | 384 | struct snd_info_entry *entry; |
385 | snd_info_private_data_t *data; | 385 | struct snd_info_private_data *data; |
386 | int mode; | 386 | int mode; |
387 | 387 | ||
388 | mode = file->f_flags & O_ACCMODE; | 388 | mode = file->f_flags & O_ACCMODE; |
@@ -420,7 +420,7 @@ static int snd_info_entry_release(struct inode *inode, struct file *file) | |||
420 | 420 | ||
421 | static unsigned int snd_info_entry_poll(struct file *file, poll_table * wait) | 421 | static unsigned int snd_info_entry_poll(struct file *file, poll_table * wait) |
422 | { | 422 | { |
423 | snd_info_private_data_t *data; | 423 | struct snd_info_private_data *data; |
424 | struct snd_info_entry *entry; | 424 | struct snd_info_entry *entry; |
425 | unsigned int mask; | 425 | unsigned int mask; |
426 | 426 | ||
@@ -447,7 +447,7 @@ static unsigned int snd_info_entry_poll(struct file *file, poll_table * wait) | |||
447 | static inline int _snd_info_entry_ioctl(struct inode *inode, struct file *file, | 447 | static inline int _snd_info_entry_ioctl(struct inode *inode, struct file *file, |
448 | unsigned int cmd, unsigned long arg) | 448 | unsigned int cmd, unsigned long arg) |
449 | { | 449 | { |
450 | snd_info_private_data_t *data; | 450 | struct snd_info_private_data *data; |
451 | struct snd_info_entry *entry; | 451 | struct snd_info_entry *entry; |
452 | 452 | ||
453 | data = file->private_data; | 453 | data = file->private_data; |
@@ -479,7 +479,7 @@ static int snd_info_entry_ioctl(struct inode *inode, struct file *file, | |||
479 | static int snd_info_entry_mmap(struct file *file, struct vm_area_struct *vma) | 479 | static int snd_info_entry_mmap(struct file *file, struct vm_area_struct *vma) |
480 | { | 480 | { |
481 | struct inode *inode = file->f_dentry->d_inode; | 481 | struct inode *inode = file->f_dentry->d_inode; |
482 | snd_info_private_data_t *data; | 482 | struct snd_info_private_data *data; |
483 | struct snd_info_entry *entry; | 483 | struct snd_info_entry *entry; |
484 | 484 | ||
485 | data = file->private_data; | 485 | data = file->private_data; |
@@ -541,7 +541,7 @@ int __init snd_info_init(void) | |||
541 | snd_proc_root = p; | 541 | snd_proc_root = p; |
542 | #ifdef CONFIG_SND_OSSEMUL | 542 | #ifdef CONFIG_SND_OSSEMUL |
543 | { | 543 | { |
544 | snd_info_entry_t *entry; | 544 | struct snd_info_entry *entry; |
545 | if ((entry = snd_info_create_module_entry(THIS_MODULE, "oss", NULL)) == NULL) | 545 | if ((entry = snd_info_create_module_entry(THIS_MODULE, "oss", NULL)) == NULL) |
546 | return -ENOMEM; | 546 | return -ENOMEM; |
547 | entry->mode = S_IFDIR | S_IRUGO | S_IXUGO; | 547 | entry->mode = S_IFDIR | S_IRUGO | S_IXUGO; |
@@ -554,7 +554,7 @@ int __init snd_info_init(void) | |||
554 | #endif | 554 | #endif |
555 | #if defined(CONFIG_SND_SEQUENCER) || defined(CONFIG_SND_SEQUENCER_MODULE) | 555 | #if defined(CONFIG_SND_SEQUENCER) || defined(CONFIG_SND_SEQUENCER_MODULE) |
556 | { | 556 | { |
557 | snd_info_entry_t *entry; | 557 | struct snd_info_entry *entry; |
558 | if ((entry = snd_info_create_module_entry(THIS_MODULE, "seq", NULL)) == NULL) | 558 | if ((entry = snd_info_create_module_entry(THIS_MODULE, "seq", NULL)) == NULL) |
559 | return -ENOMEM; | 559 | return -ENOMEM; |
560 | entry->mode = S_IFDIR | S_IRUGO | S_IXUGO; | 560 | entry->mode = S_IFDIR | S_IRUGO | S_IXUGO; |
@@ -601,10 +601,10 @@ int __exit snd_info_done(void) | |||
601 | * create a card proc file | 601 | * create a card proc file |
602 | * called from init.c | 602 | * called from init.c |
603 | */ | 603 | */ |
604 | int snd_info_card_create(snd_card_t * card) | 604 | int snd_info_card_create(struct snd_card *card) |
605 | { | 605 | { |
606 | char str[8]; | 606 | char str[8]; |
607 | snd_info_entry_t *entry; | 607 | struct snd_info_entry *entry; |
608 | 608 | ||
609 | snd_assert(card != NULL, return -ENXIO); | 609 | snd_assert(card != NULL, return -ENXIO); |
610 | 610 | ||
@@ -624,7 +624,7 @@ int snd_info_card_create(snd_card_t * card) | |||
624 | * register the card proc file | 624 | * register the card proc file |
625 | * called from init.c | 625 | * called from init.c |
626 | */ | 626 | */ |
627 | int snd_info_card_register(snd_card_t * card) | 627 | int snd_info_card_register(struct snd_card *card) |
628 | { | 628 | { |
629 | struct proc_dir_entry *p; | 629 | struct proc_dir_entry *p; |
630 | 630 | ||
@@ -644,7 +644,7 @@ int snd_info_card_register(snd_card_t * card) | |||
644 | * de-register the card proc file | 644 | * de-register the card proc file |
645 | * called from init.c | 645 | * called from init.c |
646 | */ | 646 | */ |
647 | int snd_info_card_free(snd_card_t * card) | 647 | int snd_info_card_free(struct snd_card *card) |
648 | { | 648 | { |
649 | snd_assert(card != NULL, return -ENXIO); | 649 | snd_assert(card != NULL, return -ENXIO); |
650 | if (card->proc_root_link) { | 650 | if (card->proc_root_link) { |
@@ -669,7 +669,7 @@ int snd_info_card_free(snd_card_t * card) | |||
669 | * | 669 | * |
670 | * Returns zero if successful, or 1 if error or EOF. | 670 | * Returns zero if successful, or 1 if error or EOF. |
671 | */ | 671 | */ |
672 | int snd_info_get_line(snd_info_buffer_t * buffer, char *line, int len) | 672 | int snd_info_get_line(struct snd_info_buffer *buffer, char *line, int len) |
673 | { | 673 | { |
674 | int c = -1; | 674 | int c = -1; |
675 | 675 | ||
@@ -747,9 +747,9 @@ char *snd_info_get_str(char *dest, char *src, int len) | |||
747 | * | 747 | * |
748 | * Returns the pointer of the new instance, or NULL on failure. | 748 | * Returns the pointer of the new instance, or NULL on failure. |
749 | */ | 749 | */ |
750 | static snd_info_entry_t *snd_info_create_entry(const char *name) | 750 | static struct snd_info_entry *snd_info_create_entry(const char *name) |
751 | { | 751 | { |
752 | snd_info_entry_t *entry; | 752 | struct snd_info_entry *entry; |
753 | entry = kzalloc(sizeof(*entry), GFP_KERNEL); | 753 | entry = kzalloc(sizeof(*entry), GFP_KERNEL); |
754 | if (entry == NULL) | 754 | if (entry == NULL) |
755 | return NULL; | 755 | return NULL; |
@@ -774,11 +774,11 @@ static snd_info_entry_t *snd_info_create_entry(const char *name) | |||
774 | * | 774 | * |
775 | * Returns the pointer of the new instance, or NULL on failure. | 775 | * Returns the pointer of the new instance, or NULL on failure. |
776 | */ | 776 | */ |
777 | snd_info_entry_t *snd_info_create_module_entry(struct module * module, | 777 | struct snd_info_entry *snd_info_create_module_entry(struct module * module, |
778 | const char *name, | 778 | const char *name, |
779 | snd_info_entry_t *parent) | 779 | struct snd_info_entry *parent) |
780 | { | 780 | { |
781 | snd_info_entry_t *entry = snd_info_create_entry(name); | 781 | struct snd_info_entry *entry = snd_info_create_entry(name); |
782 | if (entry) { | 782 | if (entry) { |
783 | entry->module = module; | 783 | entry->module = module; |
784 | entry->parent = parent; | 784 | entry->parent = parent; |
@@ -796,11 +796,11 @@ snd_info_entry_t *snd_info_create_module_entry(struct module * module, | |||
796 | * | 796 | * |
797 | * Returns the pointer of the new instance, or NULL on failure. | 797 | * Returns the pointer of the new instance, or NULL on failure. |
798 | */ | 798 | */ |
799 | snd_info_entry_t *snd_info_create_card_entry(snd_card_t * card, | 799 | struct snd_info_entry *snd_info_create_card_entry(struct snd_card *card, |
800 | const char *name, | 800 | const char *name, |
801 | snd_info_entry_t * parent) | 801 | struct snd_info_entry * parent) |
802 | { | 802 | { |
803 | snd_info_entry_t *entry = snd_info_create_entry(name); | 803 | struct snd_info_entry *entry = snd_info_create_entry(name); |
804 | if (entry) { | 804 | if (entry) { |
805 | entry->module = card->module; | 805 | entry->module = card->module; |
806 | entry->card = card; | 806 | entry->card = card; |
@@ -809,29 +809,29 @@ snd_info_entry_t *snd_info_create_card_entry(snd_card_t * card, | |||
809 | return entry; | 809 | return entry; |
810 | } | 810 | } |
811 | 811 | ||
812 | static int snd_info_dev_free_entry(snd_device_t *device) | 812 | static int snd_info_dev_free_entry(struct snd_device *device) |
813 | { | 813 | { |
814 | snd_info_entry_t *entry = device->device_data; | 814 | struct snd_info_entry *entry = device->device_data; |
815 | snd_info_free_entry(entry); | 815 | snd_info_free_entry(entry); |
816 | return 0; | 816 | return 0; |
817 | } | 817 | } |
818 | 818 | ||
819 | static int snd_info_dev_register_entry(snd_device_t *device) | 819 | static int snd_info_dev_register_entry(struct snd_device *device) |
820 | { | 820 | { |
821 | snd_info_entry_t *entry = device->device_data; | 821 | struct snd_info_entry *entry = device->device_data; |
822 | return snd_info_register(entry); | 822 | return snd_info_register(entry); |
823 | } | 823 | } |
824 | 824 | ||
825 | static int snd_info_dev_disconnect_entry(snd_device_t *device) | 825 | static int snd_info_dev_disconnect_entry(struct snd_device *device) |
826 | { | 826 | { |
827 | snd_info_entry_t *entry = device->device_data; | 827 | struct snd_info_entry *entry = device->device_data; |
828 | entry->disconnected = 1; | 828 | entry->disconnected = 1; |
829 | return 0; | 829 | return 0; |
830 | } | 830 | } |
831 | 831 | ||
832 | static int snd_info_dev_unregister_entry(snd_device_t *device) | 832 | static int snd_info_dev_unregister_entry(struct snd_device *device) |
833 | { | 833 | { |
834 | snd_info_entry_t *entry = device->device_data; | 834 | struct snd_info_entry *entry = device->device_data; |
835 | return snd_info_unregister(entry); | 835 | return snd_info_unregister(entry); |
836 | } | 836 | } |
837 | 837 | ||
@@ -855,16 +855,16 @@ static int snd_info_dev_unregister_entry(snd_device_t *device) | |||
855 | * | 855 | * |
856 | * Returns zero if successful, or a negative error code on failure. | 856 | * Returns zero if successful, or a negative error code on failure. |
857 | */ | 857 | */ |
858 | int snd_card_proc_new(snd_card_t *card, const char *name, | 858 | int snd_card_proc_new(struct snd_card *card, const char *name, |
859 | snd_info_entry_t **entryp) | 859 | struct snd_info_entry **entryp) |
860 | { | 860 | { |
861 | static snd_device_ops_t ops = { | 861 | static struct snd_device_ops ops = { |
862 | .dev_free = snd_info_dev_free_entry, | 862 | .dev_free = snd_info_dev_free_entry, |
863 | .dev_register = snd_info_dev_register_entry, | 863 | .dev_register = snd_info_dev_register_entry, |
864 | .dev_disconnect = snd_info_dev_disconnect_entry, | 864 | .dev_disconnect = snd_info_dev_disconnect_entry, |
865 | .dev_unregister = snd_info_dev_unregister_entry | 865 | .dev_unregister = snd_info_dev_unregister_entry |
866 | }; | 866 | }; |
867 | snd_info_entry_t *entry; | 867 | struct snd_info_entry *entry; |
868 | int err; | 868 | int err; |
869 | 869 | ||
870 | entry = snd_info_create_card_entry(card, name, card->proc_root); | 870 | entry = snd_info_create_card_entry(card, name, card->proc_root); |
@@ -885,7 +885,7 @@ int snd_card_proc_new(snd_card_t *card, const char *name, | |||
885 | * | 885 | * |
886 | * Releases the info entry. Don't call this after registered. | 886 | * Releases the info entry. Don't call this after registered. |
887 | */ | 887 | */ |
888 | void snd_info_free_entry(snd_info_entry_t * entry) | 888 | void snd_info_free_entry(struct snd_info_entry * entry) |
889 | { | 889 | { |
890 | if (entry == NULL) | 890 | if (entry == NULL) |
891 | return; | 891 | return; |
@@ -903,7 +903,7 @@ void snd_info_free_entry(snd_info_entry_t * entry) | |||
903 | * | 903 | * |
904 | * Returns zero if successful, or a negative error code on failure. | 904 | * Returns zero if successful, or a negative error code on failure. |
905 | */ | 905 | */ |
906 | int snd_info_register(snd_info_entry_t * entry) | 906 | int snd_info_register(struct snd_info_entry * entry) |
907 | { | 907 | { |
908 | struct proc_dir_entry *root, *p = NULL; | 908 | struct proc_dir_entry *root, *p = NULL; |
909 | 909 | ||
@@ -933,7 +933,7 @@ int snd_info_register(snd_info_entry_t * entry) | |||
933 | * | 933 | * |
934 | * Returns zero if successful, or a negative error code on failure. | 934 | * Returns zero if successful, or a negative error code on failure. |
935 | */ | 935 | */ |
936 | int snd_info_unregister(snd_info_entry_t * entry) | 936 | int snd_info_unregister(struct snd_info_entry * entry) |
937 | { | 937 | { |
938 | struct proc_dir_entry *root; | 938 | struct proc_dir_entry *root; |
939 | 939 | ||
@@ -952,9 +952,9 @@ int snd_info_unregister(snd_info_entry_t * entry) | |||
952 | 952 | ||
953 | */ | 953 | */ |
954 | 954 | ||
955 | static snd_info_entry_t *snd_info_version_entry = NULL; | 955 | static struct snd_info_entry *snd_info_version_entry = NULL; |
956 | 956 | ||
957 | static void snd_info_version_read(snd_info_entry_t *entry, snd_info_buffer_t * buffer) | 957 | static void snd_info_version_read(struct snd_info_entry *entry, struct snd_info_buffer *buffer) |
958 | { | 958 | { |
959 | snd_iprintf(buffer, | 959 | snd_iprintf(buffer, |
960 | "Advanced Linux Sound Architecture Driver Version " | 960 | "Advanced Linux Sound Architecture Driver Version " |
@@ -964,7 +964,7 @@ static void snd_info_version_read(snd_info_entry_t *entry, snd_info_buffer_t * b | |||
964 | 964 | ||
965 | static int __init snd_info_version_init(void) | 965 | static int __init snd_info_version_init(void) |
966 | { | 966 | { |
967 | snd_info_entry_t *entry; | 967 | struct snd_info_entry *entry; |
968 | 968 | ||
969 | entry = snd_info_create_module_entry(THIS_MODULE, "version", NULL); | 969 | entry = snd_info_create_module_entry(THIS_MODULE, "version", NULL); |
970 | if (entry == NULL) | 970 | if (entry == NULL) |