aboutsummaryrefslogtreecommitdiffstats
path: root/sound/core
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2005-11-17 07:58:48 -0500
committerJaroslav Kysela <perex@suse.cz>2006-01-03 06:17:39 -0500
commit24c1f93188b4438c7f30df5b4cd78340cdb28daf (patch)
treecbe2c16dd32f2df04cb53d783a20ef42e5895c08 /sound/core
parentd9a98de218ce18befabb5782c43cb4a2766b4b02 (diff)
[ALSA] Remove xxx_t typedefs: Proc handler
Modules: ALSA Core Remove xxx_t typedefs from the core proc handler codes. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/core')
-rw-r--r--sound/core/info.c110
1 files changed, 55 insertions, 55 deletions
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
71static DECLARE_MUTEX(info_mutex); 71static DECLARE_MUTEX(info_mutex);
72 72
73typedef struct _snd_info_private_data { 73struct 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
80static int snd_info_version_init(void); 80static int snd_info_version_init(void);
81static int snd_info_version_done(void); 81static 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 */
93int snd_iprintf(snd_info_buffer_t * buffer, char *fmt,...) 93int 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
117static struct proc_dir_entry *snd_proc_root = NULL; 117static struct proc_dir_entry *snd_proc_root = NULL;
118snd_info_entry_t *snd_seq_root = NULL; 118struct snd_info_entry *snd_seq_root = NULL;
119#ifdef CONFIG_SND_OSSEMUL 119#ifdef CONFIG_SND_OSSEMUL
120snd_info_entry_t *snd_oss_root = NULL; 120struct snd_info_entry *snd_oss_root = NULL;
121#endif 121#endif
122 122
123static inline void snd_info_entry_prepare(struct proc_dir_entry *de) 123static 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
135static loff_t snd_info_entry_llseek(struct file *file, loff_t offset, int orig) 135static 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:
176static ssize_t snd_info_entry_read(struct file *file, char __user *buffer, 176static 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,
217static ssize_t snd_info_entry_write(struct file *file, const char __user *buffer, 217static 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
260static int snd_info_entry_open(struct inode *inode, struct file *file) 260static 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
382static int snd_info_entry_release(struct inode *inode, struct file *file) 382static 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
421static unsigned int snd_info_entry_poll(struct file *file, poll_table * wait) 421static 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)
447static inline int _snd_info_entry_ioctl(struct inode *inode, struct file *file, 447static 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,
479static int snd_info_entry_mmap(struct file *file, struct vm_area_struct *vma) 479static 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 */
604int snd_info_card_create(snd_card_t * card) 604int 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 */
627int snd_info_card_register(snd_card_t * card) 627int 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 */
647int snd_info_card_free(snd_card_t * card) 647int 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 */
672int snd_info_get_line(snd_info_buffer_t * buffer, char *line, int len) 672int 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 */
750static snd_info_entry_t *snd_info_create_entry(const char *name) 750static 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 */
777snd_info_entry_t *snd_info_create_module_entry(struct module * module, 777struct 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 */
799snd_info_entry_t *snd_info_create_card_entry(snd_card_t * card, 799struct 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
812static int snd_info_dev_free_entry(snd_device_t *device) 812static 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
819static int snd_info_dev_register_entry(snd_device_t *device) 819static 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
825static int snd_info_dev_disconnect_entry(snd_device_t *device) 825static 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
832static int snd_info_dev_unregister_entry(snd_device_t *device) 832static 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 */
858int snd_card_proc_new(snd_card_t *card, const char *name, 858int 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 */
888void snd_info_free_entry(snd_info_entry_t * entry) 888void 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 */
906int snd_info_register(snd_info_entry_t * entry) 906int 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 */
936int snd_info_unregister(snd_info_entry_t * entry) 936int 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
955static snd_info_entry_t *snd_info_version_entry = NULL; 955static struct snd_info_entry *snd_info_version_entry = NULL;
956 956
957static void snd_info_version_read(snd_info_entry_t *entry, snd_info_buffer_t * buffer) 957static 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
965static int __init snd_info_version_init(void) 965static 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)