aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2005-11-17 07:51:18 -0500
committerJaroslav Kysela <perex@suse.cz>2006-01-03 06:17:30 -0500
commit512bbd6a85230f16389f0dd51925472e72fc8a91 (patch)
treef563f496c46355ed6ed1bca4ab876e984eb69a84 /sound
parent3f05f868f1112b970e7fb9c0aa42cc99370098fe (diff)
[ALSA] Remove xxx_t typedefs: Core component
Modules: ALSA Core Remove xxx_t typedefs from the core component. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r--sound/core/device.c42
-rw-r--r--sound/core/init.c86
-rw-r--r--sound/core/sound.c32
3 files changed, 83 insertions, 77 deletions
diff --git a/sound/core/device.c b/sound/core/device.c
index 1f509f56e60c..afa8cc7fb05e 100644
--- a/sound/core/device.c
+++ b/sound/core/device.c
@@ -41,10 +41,10 @@
41 * 41 *
42 * Returns zero if successful, or a negative error code on failure. 42 * Returns zero if successful, or a negative error code on failure.
43 */ 43 */
44int snd_device_new(snd_card_t *card, snd_device_type_t type, 44int snd_device_new(struct snd_card *card, snd_device_type_t type,
45 void *device_data, snd_device_ops_t *ops) 45 void *device_data, struct snd_device_ops *ops)
46{ 46{
47 snd_device_t *dev; 47 struct snd_device *dev;
48 48
49 snd_assert(card != NULL, return -ENXIO); 49 snd_assert(card != NULL, return -ENXIO);
50 snd_assert(device_data != NULL, return -ENXIO); 50 snd_assert(device_data != NULL, return -ENXIO);
@@ -73,10 +73,10 @@ int snd_device_new(snd_card_t *card, snd_device_type_t type,
73 * Returns zero if successful, or a negative error code on failure or if the 73 * Returns zero if successful, or a negative error code on failure or if the
74 * device not found. 74 * device not found.
75 */ 75 */
76int snd_device_free(snd_card_t *card, void *device_data) 76int snd_device_free(struct snd_card *card, void *device_data)
77{ 77{
78 struct list_head *list; 78 struct list_head *list;
79 snd_device_t *dev; 79 struct snd_device *dev;
80 80
81 snd_assert(card != NULL, return -ENXIO); 81 snd_assert(card != NULL, return -ENXIO);
82 snd_assert(device_data != NULL, return -ENXIO); 82 snd_assert(device_data != NULL, return -ENXIO);
@@ -86,7 +86,8 @@ int snd_device_free(snd_card_t *card, void *device_data)
86 continue; 86 continue;
87 /* unlink */ 87 /* unlink */
88 list_del(&dev->list); 88 list_del(&dev->list);
89 if ((dev->state == SNDRV_DEV_REGISTERED || dev->state == SNDRV_DEV_DISCONNECTED) && 89 if ((dev->state == SNDRV_DEV_REGISTERED ||
90 dev->state == SNDRV_DEV_DISCONNECTED) &&
90 dev->ops->dev_unregister) { 91 dev->ops->dev_unregister) {
91 if (dev->ops->dev_unregister(dev)) 92 if (dev->ops->dev_unregister(dev))
92 snd_printk(KERN_ERR "device unregister failure\n"); 93 snd_printk(KERN_ERR "device unregister failure\n");
@@ -99,7 +100,8 @@ int snd_device_free(snd_card_t *card, void *device_data)
99 kfree(dev); 100 kfree(dev);
100 return 0; 101 return 0;
101 } 102 }
102 snd_printd("device free %p (from %p), not found\n", device_data, __builtin_return_address(0)); 103 snd_printd("device free %p (from %p), not found\n", device_data,
104 __builtin_return_address(0));
103 return -ENXIO; 105 return -ENXIO;
104} 106}
105 107
@@ -116,10 +118,10 @@ int snd_device_free(snd_card_t *card, void *device_data)
116 * Returns zero if successful, or a negative error code on failure or if the 118 * Returns zero if successful, or a negative error code on failure or if the
117 * device not found. 119 * device not found.
118 */ 120 */
119int snd_device_disconnect(snd_card_t *card, void *device_data) 121int snd_device_disconnect(struct snd_card *card, void *device_data)
120{ 122{
121 struct list_head *list; 123 struct list_head *list;
122 snd_device_t *dev; 124 struct snd_device *dev;
123 125
124 snd_assert(card != NULL, return -ENXIO); 126 snd_assert(card != NULL, return -ENXIO);
125 snd_assert(device_data != NULL, return -ENXIO); 127 snd_assert(device_data != NULL, return -ENXIO);
@@ -127,14 +129,16 @@ int snd_device_disconnect(snd_card_t *card, void *device_data)
127 dev = snd_device(list); 129 dev = snd_device(list);
128 if (dev->device_data != device_data) 130 if (dev->device_data != device_data)
129 continue; 131 continue;
130 if (dev->state == SNDRV_DEV_REGISTERED && dev->ops->dev_disconnect) { 132 if (dev->state == SNDRV_DEV_REGISTERED &&
133 dev->ops->dev_disconnect) {
131 if (dev->ops->dev_disconnect(dev)) 134 if (dev->ops->dev_disconnect(dev))
132 snd_printk(KERN_ERR "device disconnect failure\n"); 135 snd_printk(KERN_ERR "device disconnect failure\n");
133 dev->state = SNDRV_DEV_DISCONNECTED; 136 dev->state = SNDRV_DEV_DISCONNECTED;
134 } 137 }
135 return 0; 138 return 0;
136 } 139 }
137 snd_printd("device disconnect %p (from %p), not found\n", device_data, __builtin_return_address(0)); 140 snd_printd("device disconnect %p (from %p), not found\n", device_data,
141 __builtin_return_address(0));
138 return -ENXIO; 142 return -ENXIO;
139} 143}
140 144
@@ -151,10 +155,10 @@ int snd_device_disconnect(snd_card_t *card, void *device_data)
151 * Returns zero if successful, or a negative error code on failure or if the 155 * Returns zero if successful, or a negative error code on failure or if the
152 * device not found. 156 * device not found.
153 */ 157 */
154int snd_device_register(snd_card_t *card, void *device_data) 158int snd_device_register(struct snd_card *card, void *device_data)
155{ 159{
156 struct list_head *list; 160 struct list_head *list;
157 snd_device_t *dev; 161 struct snd_device *dev;
158 int err; 162 int err;
159 163
160 snd_assert(card != NULL, return -ENXIO); 164 snd_assert(card != NULL, return -ENXIO);
@@ -179,10 +183,10 @@ int snd_device_register(snd_card_t *card, void *device_data)
179 * register all the devices on the card. 183 * register all the devices on the card.
180 * called from init.c 184 * called from init.c
181 */ 185 */
182int snd_device_register_all(snd_card_t *card) 186int snd_device_register_all(struct snd_card *card)
183{ 187{
184 struct list_head *list; 188 struct list_head *list;
185 snd_device_t *dev; 189 struct snd_device *dev;
186 int err; 190 int err;
187 191
188 snd_assert(card != NULL, return -ENXIO); 192 snd_assert(card != NULL, return -ENXIO);
@@ -201,9 +205,9 @@ int snd_device_register_all(snd_card_t *card)
201 * disconnect all the devices on the card. 205 * disconnect all the devices on the card.
202 * called from init.c 206 * called from init.c
203 */ 207 */
204int snd_device_disconnect_all(snd_card_t *card) 208int snd_device_disconnect_all(struct snd_card *card)
205{ 209{
206 snd_device_t *dev; 210 struct snd_device *dev;
207 struct list_head *list; 211 struct list_head *list;
208 int err = 0; 212 int err = 0;
209 213
@@ -220,9 +224,9 @@ int snd_device_disconnect_all(snd_card_t *card)
220 * release all the devices on the card. 224 * release all the devices on the card.
221 * called from init.c 225 * called from init.c
222 */ 226 */
223int snd_device_free_all(snd_card_t *card, snd_device_cmd_t cmd) 227int snd_device_free_all(struct snd_card *card, snd_device_cmd_t cmd)
224{ 228{
225 snd_device_t *dev; 229 struct snd_device *dev;
226 struct list_head *list; 230 struct list_head *list;
227 int err; 231 int err;
228 unsigned int range_low, range_high; 232 unsigned int range_low, range_high;
diff --git a/sound/core/init.c b/sound/core/init.c
index 33813f92ab52..dca64d199cbe 100644
--- a/sound/core/init.c
+++ b/sound/core/init.c
@@ -40,14 +40,15 @@ struct snd_shutdown_f_ops {
40}; 40};
41 41
42unsigned int snd_cards_lock = 0; /* locked for registering/using */ 42unsigned int snd_cards_lock = 0; /* locked for registering/using */
43snd_card_t *snd_cards[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS-1)] = NULL}; 43struct snd_card *snd_cards[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS-1)] = NULL};
44DEFINE_RWLOCK(snd_card_rwlock); 44DEFINE_RWLOCK(snd_card_rwlock);
45 45
46#if defined(CONFIG_SND_MIXER_OSS) || defined(CONFIG_SND_MIXER_OSS_MODULE) 46#if defined(CONFIG_SND_MIXER_OSS) || defined(CONFIG_SND_MIXER_OSS_MODULE)
47int (*snd_mixer_oss_notify_callback)(snd_card_t *card, int free_flag); 47int (*snd_mixer_oss_notify_callback)(struct snd_card *card, int free_flag);
48#endif 48#endif
49 49
50static void snd_card_id_read(snd_info_entry_t *entry, snd_info_buffer_t * buffer) 50static void snd_card_id_read(struct snd_info_entry *entry,
51 struct snd_info_buffer *buffer)
51{ 52{
52 snd_iprintf(buffer, "%s\n", entry->card->id); 53 snd_iprintf(buffer, "%s\n", entry->card->id);
53} 54}
@@ -63,13 +64,13 @@ static void snd_card_free_thread(void * __card);
63 * 64 *
64 * Creates and initializes a soundcard structure. 65 * Creates and initializes a soundcard structure.
65 * 66 *
66 * Returns kmallocated snd_card_t structure. Creates the ALSA control interface 67 * Returns kmallocated snd_card structure. Creates the ALSA control interface
67 * (which is blocked until snd_card_register function is called). 68 * (which is blocked until snd_card_register function is called).
68 */ 69 */
69snd_card_t *snd_card_new(int idx, const char *xid, 70struct snd_card *snd_card_new(int idx, const char *xid,
70 struct module *module, int extra_size) 71 struct module *module, int extra_size)
71{ 72{
72 snd_card_t *card; 73 struct snd_card *card;
73 int err; 74 int err;
74 75
75 if (extra_size < 0) 76 if (extra_size < 0)
@@ -132,7 +133,7 @@ snd_card_t *snd_card_new(int idx, const char *xid,
132 goto __error_ctl; 133 goto __error_ctl;
133 } 134 }
134 if (extra_size > 0) 135 if (extra_size > 0)
135 card->private_data = (char *)card + sizeof(snd_card_t); 136 card->private_data = (char *)card + sizeof(struct snd_card);
136 return card; 137 return card;
137 138
138 __error_ctl: 139 __error_ctl:
@@ -158,7 +159,7 @@ static unsigned int snd_disconnect_poll(struct file * file, poll_table * wait)
158 * Note: The current implementation replaces all active file->f_op with special 159 * Note: The current implementation replaces all active file->f_op with special
159 * dummy file operations (they do nothing except release). 160 * dummy file operations (they do nothing except release).
160 */ 161 */
161int snd_card_disconnect(snd_card_t * card) 162int snd_card_disconnect(struct snd_card *card)
162{ 163{
163 struct snd_monitor_file *mfile; 164 struct snd_monitor_file *mfile;
164 struct file *file; 165 struct file *file;
@@ -229,7 +230,7 @@ int snd_card_disconnect(snd_card_t * card)
229} 230}
230 231
231#ifdef CONFIG_SND_GENERIC_DRIVER 232#ifdef CONFIG_SND_GENERIC_DRIVER
232static void snd_generic_device_unregister(snd_card_t *card); 233static void snd_generic_device_unregister(struct snd_card *card);
233#else 234#else
234#define snd_generic_device_unregister(x) /*NOP*/ 235#define snd_generic_device_unregister(x) /*NOP*/
235#endif 236#endif
@@ -245,7 +246,7 @@ static void snd_generic_device_unregister(snd_card_t *card);
245 * Returns zero. Frees all associated devices and frees the control 246 * Returns zero. Frees all associated devices and frees the control
246 * interface associated to given soundcard. 247 * interface associated to given soundcard.
247 */ 248 */
248int snd_card_free(snd_card_t * card) 249int snd_card_free(struct snd_card *card)
249{ 250{
250 struct snd_shutdown_f_ops *s_f_ops; 251 struct snd_shutdown_f_ops *s_f_ops;
251 252
@@ -300,7 +301,7 @@ int snd_card_free(snd_card_t * card)
300 301
301static void snd_card_free_thread(void * __card) 302static void snd_card_free_thread(void * __card)
302{ 303{
303 snd_card_t *card = __card; 304 struct snd_card *card = __card;
304 struct module * module = card->module; 305 struct module * module = card->module;
305 306
306 if (!try_module_get(module)) { 307 if (!try_module_get(module)) {
@@ -327,7 +328,7 @@ static void snd_card_free_thread(void * __card)
327 * 328 *
328 * Returns - zero otherwise a negative error code if the start of thread failed. 329 * Returns - zero otherwise a negative error code if the start of thread failed.
329 */ 330 */
330int snd_card_free_in_thread(snd_card_t * card) 331int snd_card_free_in_thread(struct snd_card *card)
331{ 332{
332 if (card->files == NULL) { 333 if (card->files == NULL) {
333 snd_card_free(card); 334 snd_card_free(card);
@@ -343,7 +344,7 @@ int snd_card_free_in_thread(snd_card_t * card)
343 return -EFAULT; 344 return -EFAULT;
344} 345}
345 346
346static void choose_default_id(snd_card_t * card) 347static void choose_default_id(struct snd_card *card)
347{ 348{
348 int i, len, idx_flag = 0, loops = 8; 349 int i, len, idx_flag = 0, loops = 8;
349 char *id, *spos; 350 char *id, *spos;
@@ -415,10 +416,10 @@ static void choose_default_id(snd_card_t * card)
415 * 416 *
416 * Returns zero otherwise a negative error code if the registrain failed. 417 * Returns zero otherwise a negative error code if the registrain failed.
417 */ 418 */
418int snd_card_register(snd_card_t * card) 419int snd_card_register(struct snd_card *card)
419{ 420{
420 int err; 421 int err;
421 snd_info_entry_t *entry; 422 struct snd_info_entry *entry;
422 423
423 snd_assert(card != NULL, return -EINVAL); 424 snd_assert(card != NULL, return -EINVAL);
424 if ((err = snd_device_register_all(card)) < 0) 425 if ((err = snd_device_register_all(card)) < 0)
@@ -456,12 +457,12 @@ int snd_card_register(snd_card_t * card)
456 return 0; 457 return 0;
457} 458}
458 459
459static snd_info_entry_t *snd_card_info_entry = NULL; 460static struct snd_info_entry *snd_card_info_entry = NULL;
460 461
461static void snd_card_info_read(snd_info_entry_t *entry, snd_info_buffer_t * buffer) 462static void snd_card_info_read(struct snd_info_entry *entry, struct snd_info_buffer *buffer)
462{ 463{
463 int idx, count; 464 int idx, count;
464 snd_card_t *card; 465 struct snd_card *card;
465 466
466 for (idx = count = 0; idx < SNDRV_CARDS; idx++) { 467 for (idx = count = 0; idx < SNDRV_CARDS; idx++) {
467 read_lock(&snd_card_rwlock); 468 read_lock(&snd_card_rwlock);
@@ -483,10 +484,10 @@ static void snd_card_info_read(snd_info_entry_t *entry, snd_info_buffer_t * buff
483 484
484#if defined(CONFIG_SND_OSSEMUL) && defined(CONFIG_PROC_FS) 485#if defined(CONFIG_SND_OSSEMUL) && defined(CONFIG_PROC_FS)
485 486
486void snd_card_info_read_oss(snd_info_buffer_t * buffer) 487void snd_card_info_read_oss(struct snd_info_buffer *buffer)
487{ 488{
488 int idx, count; 489 int idx, count;
489 snd_card_t *card; 490 struct snd_card *card;
490 491
491 for (idx = count = 0; idx < SNDRV_CARDS; idx++) { 492 for (idx = count = 0; idx < SNDRV_CARDS; idx++) {
492 read_lock(&snd_card_rwlock); 493 read_lock(&snd_card_rwlock);
@@ -504,11 +505,12 @@ void snd_card_info_read_oss(snd_info_buffer_t * buffer)
504#endif 505#endif
505 506
506#ifdef MODULE 507#ifdef MODULE
507static snd_info_entry_t *snd_card_module_info_entry; 508static struct snd_info_entry *snd_card_module_info_entry;
508static void snd_card_module_info_read(snd_info_entry_t *entry, snd_info_buffer_t * buffer) 509static void snd_card_module_info_read(struct snd_info_entry *entry,
510 struct snd_info_buffer *buffer)
509{ 511{
510 int idx; 512 int idx;
511 snd_card_t *card; 513 struct snd_card *card;
512 514
513 for (idx = 0; idx < SNDRV_CARDS; idx++) { 515 for (idx = 0; idx < SNDRV_CARDS; idx++) {
514 read_lock(&snd_card_rwlock); 516 read_lock(&snd_card_rwlock);
@@ -521,7 +523,7 @@ static void snd_card_module_info_read(snd_info_entry_t *entry, snd_info_buffer_t
521 523
522int __init snd_card_info_init(void) 524int __init snd_card_info_init(void)
523{ 525{
524 snd_info_entry_t *entry; 526 struct snd_info_entry *entry;
525 527
526 entry = snd_info_create_module_entry(THIS_MODULE, "cards", NULL); 528 entry = snd_info_create_module_entry(THIS_MODULE, "cards", NULL);
527 if (! entry) 529 if (! entry)
@@ -571,7 +573,7 @@ int __exit snd_card_info_done(void)
571 * Returns zero otherwise a negative error code. 573 * Returns zero otherwise a negative error code.
572 */ 574 */
573 575
574int snd_component_add(snd_card_t *card, const char *component) 576int snd_component_add(struct snd_card *card, const char *component)
575{ 577{
576 char *ptr; 578 char *ptr;
577 int len = strlen(component); 579 int len = strlen(component);
@@ -602,7 +604,7 @@ int snd_component_add(snd_card_t *card, const char *component)
602 * 604 *
603 * Returns zero or a negative error code. 605 * Returns zero or a negative error code.
604 */ 606 */
605int snd_card_file_add(snd_card_t *card, struct file *file) 607int snd_card_file_add(struct snd_card *card, struct file *file)
606{ 608{
607 struct snd_monitor_file *mfile; 609 struct snd_monitor_file *mfile;
608 610
@@ -636,7 +638,7 @@ int snd_card_file_add(snd_card_t *card, struct file *file)
636 * 638 *
637 * Returns zero or a negative error code. 639 * Returns zero or a negative error code.
638 */ 640 */
639int snd_card_file_remove(snd_card_t *card, struct file *file) 641int snd_card_file_remove(struct snd_card *card, struct file *file)
640{ 642{
641 struct snd_monitor_file *mfile, *pfile = NULL; 643 struct snd_monitor_file *mfile, *pfile = NULL;
642 644
@@ -671,7 +673,7 @@ int snd_card_file_remove(snd_card_t *card, struct file *file)
671 */ 673 */
672struct snd_generic_device { 674struct snd_generic_device {
673 struct platform_device pdev; 675 struct platform_device pdev;
674 snd_card_t *card; 676 struct snd_card *card;
675}; 677};
676 678
677#define get_snd_generic_card(dev) container_of(dev, struct snd_generic_device, pdev)->card 679#define get_snd_generic_card(dev) container_of(dev, struct snd_generic_device, pdev)->card
@@ -698,7 +700,7 @@ void snd_generic_device_release(struct device *dev)
698{ 700{
699} 701}
700 702
701static int snd_generic_device_register(snd_card_t *card) 703static int snd_generic_device_register(struct snd_card *card)
702{ 704{
703 struct snd_generic_device *dev; 705 struct snd_generic_device *dev;
704 int err; 706 int err;
@@ -724,7 +726,7 @@ static int snd_generic_device_register(snd_card_t *card)
724 return 0; 726 return 0;
725} 727}
726 728
727static void snd_generic_device_unregister(snd_card_t *card) 729static void snd_generic_device_unregister(struct snd_card *card)
728{ 730{
729 struct snd_generic_device *dev = card->generic_dev; 731 struct snd_generic_device *dev = card->generic_dev;
730 if (dev) { 732 if (dev) {
@@ -744,7 +746,7 @@ static void snd_generic_device_unregister(snd_card_t *card)
744 * 746 *
745 * Returns zero if successful, or a negative error code. 747 * Returns zero if successful, or a negative error code.
746 */ 748 */
747int snd_card_set_generic_dev(snd_card_t *card) 749int snd_card_set_generic_dev(struct snd_card *card)
748{ 750{
749 int err; 751 int err;
750 if ((err = snd_generic_device_register(card)) < 0) 752 if ((err = snd_generic_device_register(card)) < 0)
@@ -766,7 +768,7 @@ int snd_card_set_generic_dev(snd_card_t *card)
766 * 768 *
767 * Note: the power lock must be active before call. 769 * Note: the power lock must be active before call.
768 */ 770 */
769int snd_power_wait(snd_card_t *card, unsigned int power_state, struct file *file) 771int snd_power_wait(struct snd_card *card, unsigned int power_state, struct file *file)
770{ 772{
771 wait_queue_t wait; 773 wait_queue_t wait;
772 int result = 0; 774 int result = 0;
@@ -809,9 +811,9 @@ int snd_power_wait(snd_card_t *card, unsigned int power_state, struct file *file
809 * These callbacks are called from ALSA's common PCI suspend/resume 811 * These callbacks are called from ALSA's common PCI suspend/resume
810 * handler and from the control API. 812 * handler and from the control API.
811 */ 813 */
812int snd_card_set_pm_callback(snd_card_t *card, 814int snd_card_set_pm_callback(struct snd_card *card,
813 int (*suspend)(snd_card_t *, pm_message_t), 815 int (*suspend)(struct snd_card *, pm_message_t),
814 int (*resume)(snd_card_t *), 816 int (*resume)(struct snd_card *),
815 void *private_data) 817 void *private_data)
816{ 818{
817 card->pm_suspend = suspend; 819 card->pm_suspend = suspend;
@@ -824,7 +826,7 @@ int snd_card_set_pm_callback(snd_card_t *card,
824/* suspend/resume callbacks for snd_generic platform device */ 826/* suspend/resume callbacks for snd_generic platform device */
825static int snd_generic_suspend(struct platform_device *dev, pm_message_t state) 827static int snd_generic_suspend(struct platform_device *dev, pm_message_t state)
826{ 828{
827 snd_card_t *card; 829 struct snd_card *card;
828 830
829 card = get_snd_generic_card(dev); 831 card = get_snd_generic_card(dev);
830 if (card->power_state == SNDRV_CTL_POWER_D3hot) 832 if (card->power_state == SNDRV_CTL_POWER_D3hot)
@@ -837,7 +839,7 @@ static int snd_generic_suspend(struct platform_device *dev, pm_message_t state)
837 839
838static int snd_generic_resume(struct platform_device *dev) 840static int snd_generic_resume(struct platform_device *dev)
839{ 841{
840 snd_card_t *card; 842 struct snd_card *card;
841 843
842 card = get_snd_generic_card(dev); 844 card = get_snd_generic_card(dev);
843 if (card->power_state == SNDRV_CTL_POWER_D0) 845 if (card->power_state == SNDRV_CTL_POWER_D0)
@@ -859,9 +861,9 @@ static int snd_generic_resume(struct platform_device *dev)
859 * the given card. These callbacks are called from the ALSA's common 861 * the given card. These callbacks are called from the ALSA's common
860 * PM handler and from the control API. 862 * PM handler and from the control API.
861 */ 863 */
862int snd_card_set_generic_pm_callback(snd_card_t *card, 864int snd_card_set_generic_pm_callback(struct snd_card *card,
863 int (*suspend)(snd_card_t *, pm_message_t), 865 int (*suspend)(struct snd_card *, pm_message_t),
864 int (*resume)(snd_card_t *), 866 int (*resume)(struct snd_card *),
865 void *private_data) 867 void *private_data)
866{ 868{
867 int err; 869 int err;
@@ -874,7 +876,7 @@ int snd_card_set_generic_pm_callback(snd_card_t *card,
874#ifdef CONFIG_PCI 876#ifdef CONFIG_PCI
875int snd_card_pci_suspend(struct pci_dev *dev, pm_message_t state) 877int snd_card_pci_suspend(struct pci_dev *dev, pm_message_t state)
876{ 878{
877 snd_card_t *card = pci_get_drvdata(dev); 879 struct snd_card *card = pci_get_drvdata(dev);
878 int err; 880 int err;
879 if (! card || ! card->pm_suspend) 881 if (! card || ! card->pm_suspend)
880 return 0; 882 return 0;
@@ -888,7 +890,7 @@ int snd_card_pci_suspend(struct pci_dev *dev, pm_message_t state)
888 890
889int snd_card_pci_resume(struct pci_dev *dev) 891int snd_card_pci_resume(struct pci_dev *dev)
890{ 892{
891 snd_card_t *card = pci_get_drvdata(dev); 893 struct snd_card *card = pci_get_drvdata(dev);
892 if (! card || ! card->pm_resume) 894 if (! card || ! card->pm_resume)
893 return 0; 895 return 0;
894 if (card->power_state == SNDRV_CTL_POWER_D0) 896 if (card->power_state == SNDRV_CTL_POWER_D0)
diff --git a/sound/core/sound.c b/sound/core/sound.c
index 6e7cad1e947e..04de0084e42a 100644
--- a/sound/core/sound.c
+++ b/sound/core/sound.c
@@ -108,13 +108,13 @@ static void snd_request_other(int minor)
108 108
109#endif /* request_module support */ 109#endif /* request_module support */
110 110
111static snd_minor_t *snd_minor_search(int minor) 111static struct snd_minor *snd_minor_search(int minor)
112{ 112{
113 struct list_head *list; 113 struct list_head *list;
114 snd_minor_t *mptr; 114 struct snd_minor *mptr;
115 115
116 list_for_each(list, &snd_minors_hash[SNDRV_MINOR_CARD(minor)]) { 116 list_for_each(list, &snd_minors_hash[SNDRV_MINOR_CARD(minor)]) {
117 mptr = list_entry(list, snd_minor_t, list); 117 mptr = list_entry(list, struct snd_minor, list);
118 if (mptr->number == minor) 118 if (mptr->number == minor)
119 return mptr; 119 return mptr;
120 } 120 }
@@ -126,7 +126,7 @@ static int snd_open(struct inode *inode, struct file *file)
126 int minor = iminor(inode); 126 int minor = iminor(inode);
127 int card = SNDRV_MINOR_CARD(minor); 127 int card = SNDRV_MINOR_CARD(minor);
128 int dev = SNDRV_MINOR_DEVICE(minor); 128 int dev = SNDRV_MINOR_DEVICE(minor);
129 snd_minor_t *mptr = NULL; 129 struct snd_minor *mptr = NULL;
130 struct file_operations *old_fops; 130 struct file_operations *old_fops;
131 int err = 0; 131 int err = 0;
132 132
@@ -164,7 +164,7 @@ static struct file_operations snd_fops =
164 .open = snd_open 164 .open = snd_open
165}; 165};
166 166
167static int snd_kernel_minor(int type, snd_card_t * card, int dev) 167static int snd_kernel_minor(int type, struct snd_card *card, int dev)
168{ 168{
169 int minor; 169 int minor;
170 170
@@ -196,7 +196,7 @@ static int snd_kernel_minor(int type, snd_card_t * card, int dev)
196 * @type: the device type, SNDRV_DEVICE_TYPE_XXX 196 * @type: the device type, SNDRV_DEVICE_TYPE_XXX
197 * @card: the card instance 197 * @card: the card instance
198 * @dev: the device index 198 * @dev: the device index
199 * @reg: the snd_minor_t record 199 * @reg: the struct snd_minor record
200 * @name: the device file name 200 * @name: the device file name
201 * 201 *
202 * Registers an ALSA device file for the given card. 202 * Registers an ALSA device file for the given card.
@@ -204,16 +204,16 @@ static int snd_kernel_minor(int type, snd_card_t * card, int dev)
204 * 204 *
205 * Retrurns zero if successful, or a negative error code on failure. 205 * Retrurns zero if successful, or a negative error code on failure.
206 */ 206 */
207int snd_register_device(int type, snd_card_t * card, int dev, snd_minor_t * reg, const char *name) 207int snd_register_device(int type, struct snd_card *card, int dev, struct snd_minor * reg, const char *name)
208{ 208{
209 int minor = snd_kernel_minor(type, card, dev); 209 int minor = snd_kernel_minor(type, card, dev);
210 snd_minor_t *preg; 210 struct snd_minor *preg;
211 struct device *device = NULL; 211 struct device *device = NULL;
212 212
213 if (minor < 0) 213 if (minor < 0)
214 return minor; 214 return minor;
215 snd_assert(name, return -EINVAL); 215 snd_assert(name, return -EINVAL);
216 preg = (snd_minor_t *)kmalloc(sizeof(snd_minor_t) + strlen(name) + 1, GFP_KERNEL); 216 preg = kmalloc(sizeof(struct snd_minor) + strlen(name) + 1, GFP_KERNEL);
217 if (preg == NULL) 217 if (preg == NULL)
218 return -ENOMEM; 218 return -ENOMEM;
219 *preg = *reg; 219 *preg = *reg;
@@ -248,10 +248,10 @@ int snd_register_device(int type, snd_card_t * card, int dev, snd_minor_t * reg,
248 * 248 *
249 * Returns zero if sucecessful, or a negative error code on failure 249 * Returns zero if sucecessful, or a negative error code on failure
250 */ 250 */
251int snd_unregister_device(int type, snd_card_t * card, int dev) 251int snd_unregister_device(int type, struct snd_card *card, int dev)
252{ 252{
253 int minor = snd_kernel_minor(type, card, dev); 253 int minor = snd_kernel_minor(type, card, dev);
254 snd_minor_t *mptr; 254 struct snd_minor *mptr;
255 255
256 if (minor < 0) 256 if (minor < 0)
257 return minor; 257 return minor;
@@ -275,18 +275,18 @@ int snd_unregister_device(int type, snd_card_t * card, int dev)
275 * INFO PART 275 * INFO PART
276 */ 276 */
277 277
278static snd_info_entry_t *snd_minor_info_entry = NULL; 278static struct snd_info_entry *snd_minor_info_entry = NULL;
279 279
280static void snd_minor_info_read(snd_info_entry_t *entry, snd_info_buffer_t * buffer) 280static void snd_minor_info_read(struct snd_info_entry *entry, struct snd_info_buffer *buffer)
281{ 281{
282 int card, device; 282 int card, device;
283 struct list_head *list; 283 struct list_head *list;
284 snd_minor_t *mptr; 284 struct snd_minor *mptr;
285 285
286 down(&sound_mutex); 286 down(&sound_mutex);
287 for (card = 0; card < SNDRV_CARDS; card++) { 287 for (card = 0; card < SNDRV_CARDS; card++) {
288 list_for_each(list, &snd_minors_hash[card]) { 288 list_for_each(list, &snd_minors_hash[card]) {
289 mptr = list_entry(list, snd_minor_t, list); 289 mptr = list_entry(list, struct snd_minor, list);
290 if (SNDRV_MINOR_DEVICE(mptr->number) != SNDRV_MINOR_GLOBAL) { 290 if (SNDRV_MINOR_DEVICE(mptr->number) != SNDRV_MINOR_GLOBAL) {
291 if ((device = mptr->device) >= 0) 291 if ((device = mptr->device) >= 0)
292 snd_iprintf(buffer, "%3i: [%i-%2i]: %s\n", mptr->number, card, device, mptr->comment); 292 snd_iprintf(buffer, "%3i: [%i-%2i]: %s\n", mptr->number, card, device, mptr->comment);
@@ -302,7 +302,7 @@ static void snd_minor_info_read(snd_info_entry_t *entry, snd_info_buffer_t * buf
302 302
303int __init snd_minor_info_init(void) 303int __init snd_minor_info_init(void)
304{ 304{
305 snd_info_entry_t *entry; 305 struct snd_info_entry *entry;
306 306
307 entry = snd_info_create_module_entry(THIS_MODULE, "devices", NULL); 307 entry = snd_info_create_module_entry(THIS_MODULE, "devices", NULL);
308 if (entry) { 308 if (entry) {