Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[ALSA] Remove xxx_t typedefs: Generic drivers

Modules: Generic drivers

Remove xxx_t typedefs from the generic drivers
(dummy, mtpav, serial-u16550 and virmidi).

Signed-off-by: Takashi Iwai <tiwai@suse.de>

authored by

Takashi Iwai and committed by
Jaroslav Kysela
4a4d2cfd 03da312a

+115 -109
+65 -59
sound/drivers/dummy.c
··· 42 42 43 43 #if 0 /* emu10k1 emulation */ 44 44 #define MAX_BUFFER_SIZE (128 * 1024) 45 - static int emu10k1_playback_constraints(snd_pcm_runtime_t *runtime) 45 + static int emu10k1_playback_constraints(struct snd_pcm_runtime *runtime) 46 46 { 47 47 int err; 48 48 if ((err = snd_pcm_hw_constraint_integer(runtime, SNDRV_PCM_HW_PARAM_PERIODS)) < 0) ··· 149 149 #define MIXER_ADDR_CD 4 150 150 #define MIXER_ADDR_LAST 4 151 151 152 - typedef struct snd_card_dummy { 153 - snd_card_t *card; 152 + struct snd_dummy { 153 + struct snd_card *card; 154 154 spinlock_t mixer_lock; 155 155 int mixer_volume[MIXER_ADDR_LAST+1][2]; 156 156 int capture_source[MIXER_ADDR_LAST+1][2]; 157 - } snd_card_dummy_t; 157 + }; 158 158 159 - typedef struct snd_card_dummy_pcm { 160 - snd_card_dummy_t *dummy; 159 + struct snd_dummy_pcm { 160 + struct snd_dummy *dummy; 161 161 spinlock_t lock; 162 162 struct timer_list timer; 163 163 unsigned int pcm_size; ··· 166 166 unsigned int pcm_jiffie; /* bytes per one jiffie */ 167 167 unsigned int pcm_irq_pos; /* IRQ position */ 168 168 unsigned int pcm_buf_pos; /* position in buffer */ 169 - snd_pcm_substream_t *substream; 170 - } snd_card_dummy_pcm_t; 169 + struct snd_pcm_substream *substream; 170 + }; 171 171 172 - static snd_card_t *snd_dummy_cards[SNDRV_CARDS] = SNDRV_DEFAULT_PTR; 172 + static struct snd_card *snd_dummy_cards[SNDRV_CARDS] = SNDRV_DEFAULT_PTR; 173 173 174 174 175 - static inline void snd_card_dummy_pcm_timer_start(snd_card_dummy_pcm_t *dpcm) 175 + static inline void snd_card_dummy_pcm_timer_start(struct snd_dummy_pcm *dpcm) 176 176 { 177 177 dpcm->timer.expires = 1 + jiffies; 178 178 add_timer(&dpcm->timer); 179 179 } 180 180 181 - static inline void snd_card_dummy_pcm_timer_stop(snd_card_dummy_pcm_t *dpcm) 181 + static inline void snd_card_dummy_pcm_timer_stop(struct snd_dummy_pcm *dpcm) 182 182 { 183 183 del_timer(&dpcm->timer); 184 184 } 185 185 186 - static int snd_card_dummy_pcm_trigger(snd_pcm_substream_t *substream, int cmd) 186 + static int snd_card_dummy_pcm_trigger(struct snd_pcm_substream *substream, int cmd) 187 187 { 188 - snd_pcm_runtime_t *runtime = substream->runtime; 189 - snd_dummy_card_pcm_t *dpcm = runtime->private_data; 188 + struct snd_pcm_runtime *runtime = substream->runtime; 189 + struct snd_dummy_pcm *dpcm = runtime->private_data; 190 190 int err = 0; 191 191 192 192 spin_lock(&dpcm->lock); ··· 201 201 return err; 202 202 } 203 203 204 - static int snd_card_dummy_pcm_prepare(snd_pcm_substream_t * substream) 204 + static int snd_card_dummy_pcm_prepare(struct snd_pcm_substream *substream) 205 205 { 206 - snd_pcm_runtime_t *runtime = substream->runtime; 207 - snd_card_dummy_pcm_t *dpcm = runtime->private_data; 206 + struct snd_pcm_runtime *runtime = substream->runtime; 207 + struct snd_dummy_pcm *dpcm = runtime->private_data; 208 208 unsigned int bps; 209 209 210 210 bps = runtime->rate * runtime->channels; ··· 223 223 224 224 static void snd_card_dummy_pcm_timer_function(unsigned long data) 225 225 { 226 - snd_card_dummy_pcm_t *dpcm = (snd_card_dummy_pcm_t *)data; 226 + struct snd_dummy_pcm *dpcm = (struct snd_dummy_pcm *)data; 227 227 228 228 spin_lock(&dpcm->lock); 229 229 dpcm->timer.expires = 1 + jiffies; ··· 240 240 spin_unlock(&dpcm->lock); 241 241 } 242 242 243 - static snd_pcm_uframes_t snd_card_dummy_pcm_pointer(snd_pcm_substream_t * substream) 243 + static snd_pcm_uframes_t snd_card_dummy_pcm_pointer(struct snd_pcm_substream *substream) 244 244 { 245 - snd_pcm_runtime_t *runtime = substream->runtime; 246 - snd_card_dummy_pcm_t *dpcm = runtime->private_data; 245 + struct snd_pcm_runtime *runtime = substream->runtime; 246 + struct snd_dummy_pcm *dpcm = runtime->private_data; 247 247 248 248 return bytes_to_frames(runtime, dpcm->pcm_buf_pos); 249 249 } 250 250 251 - static snd_pcm_hardware_t snd_card_dummy_playback = 251 + static struct snd_pcm_hardware snd_card_dummy_playback = 252 252 { 253 253 .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | 254 254 SNDRV_PCM_INFO_MMAP_VALID), ··· 266 266 .fifo_size = 0, 267 267 }; 268 268 269 - static snd_pcm_hardware_t snd_card_dummy_capture = 269 + static struct snd_pcm_hardware snd_card_dummy_capture = 270 270 { 271 271 .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | 272 272 SNDRV_PCM_INFO_MMAP_VALID), ··· 284 284 .fifo_size = 0, 285 285 }; 286 286 287 - static void snd_card_dummy_runtime_free(snd_pcm_runtime_t *runtime) 287 + static void snd_card_dummy_runtime_free(struct snd_pcm_runtime *runtime) 288 288 { 289 289 kfree(runtime->private_data); 290 290 } 291 291 292 - static int snd_card_dummy_hw_params(snd_pcm_substream_t * substream, 293 - snd_pcm_hw_params_t * hw_params) 292 + static int snd_card_dummy_hw_params(struct snd_pcm_substream *substream, 293 + struct snd_pcm_hw_params *hw_params) 294 294 { 295 295 return snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params)); 296 296 } 297 297 298 - static int snd_card_dummy_hw_free(snd_pcm_substream_t * substream) 298 + static int snd_card_dummy_hw_free(struct snd_pcm_substream *substream) 299 299 { 300 300 return snd_pcm_lib_free_pages(substream); 301 301 } 302 302 303 - static snd_card_dummy_pcm_t *new_pcm_stream(snd_pcm_substream_t *substream) 303 + static struct snd_dummy_pcm *new_pcm_stream(struct snd_pcm_substream *substream) 304 304 { 305 - snd_card_dummy_pcm_t *dpcm; 305 + struct snd_dummy_pcm *dpcm; 306 306 307 307 dpcm = kzalloc(sizeof(*dpcm), GFP_KERNEL); 308 308 if (! dpcm) ··· 315 315 return dpcm; 316 316 } 317 317 318 - static int snd_card_dummy_playback_open(snd_pcm_substream_t * substream) 318 + static int snd_card_dummy_playback_open(struct snd_pcm_substream *substream) 319 319 { 320 - snd_pcm_runtime_t *runtime = substream->runtime; 321 - snd_card_dummy_pcm_t *dpcm; 320 + struct snd_pcm_runtime *runtime = substream->runtime; 321 + struct snd_dummy_pcm *dpcm; 322 322 int err; 323 323 324 324 if ((dpcm = new_pcm_stream(substream)) == NULL) ··· 340 340 return 0; 341 341 } 342 342 343 - static int snd_card_dummy_capture_open(snd_pcm_substream_t * substream) 343 + static int snd_card_dummy_capture_open(struct snd_pcm_substream *substream) 344 344 { 345 - snd_pcm_runtime_t *runtime = substream->runtime; 346 - snd_card_dummy_pcm_t *dpcm; 345 + struct snd_pcm_runtime *runtime = substream->runtime; 346 + struct snd_dummy_pcm *dpcm; 347 347 int err; 348 348 349 349 if ((dpcm = new_pcm_stream(substream)) == NULL) ··· 365 365 return 0; 366 366 } 367 367 368 - static int snd_card_dummy_playback_close(snd_pcm_substream_t * substream) 368 + static int snd_card_dummy_playback_close(struct snd_pcm_substream *substream) 369 369 { 370 370 return 0; 371 371 } 372 372 373 - static int snd_card_dummy_capture_close(snd_pcm_substream_t * substream) 373 + static int snd_card_dummy_capture_close(struct snd_pcm_substream *substream) 374 374 { 375 375 return 0; 376 376 } 377 377 378 - static snd_pcm_ops_t snd_card_dummy_playback_ops = { 378 + static struct snd_pcm_ops snd_card_dummy_playback_ops = { 379 379 .open = snd_card_dummy_playback_open, 380 380 .close = snd_card_dummy_playback_close, 381 381 .ioctl = snd_pcm_lib_ioctl, ··· 386 386 .pointer = snd_card_dummy_pcm_pointer, 387 387 }; 388 388 389 - static snd_pcm_ops_t snd_card_dummy_capture_ops = { 389 + static struct snd_pcm_ops snd_card_dummy_capture_ops = { 390 390 .open = snd_card_dummy_capture_open, 391 391 .close = snd_card_dummy_capture_close, 392 392 .ioctl = snd_pcm_lib_ioctl, ··· 397 397 .pointer = snd_card_dummy_pcm_pointer, 398 398 }; 399 399 400 - static int __init snd_card_dummy_pcm(snd_card_dummy_t *dummy, int device, int substreams) 400 + static int __init snd_card_dummy_pcm(struct snd_dummy *dummy, int device, int substreams) 401 401 { 402 - snd_pcm_t *pcm; 402 + struct snd_pcm *pcm; 403 403 int err; 404 404 405 - if ((err = snd_pcm_new(dummy->card, "Dummy PCM", device, substreams, substreams, &pcm)) < 0) 405 + if ((err = snd_pcm_new(dummy->card, "Dummy PCM", device, 406 + substreams, substreams, &pcm)) < 0) 406 407 return err; 407 408 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &snd_card_dummy_playback_ops); 408 409 snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &snd_card_dummy_capture_ops); ··· 422 421 .get = snd_dummy_volume_get, .put = snd_dummy_volume_put, \ 423 422 .private_value = addr } 424 423 425 - static int snd_dummy_volume_info(snd_kcontrol_t * kcontrol, snd_ctl_elem_info_t * uinfo) 424 + static int snd_dummy_volume_info(struct snd_kcontrol *kcontrol, 425 + struct snd_ctl_elem_info *uinfo) 426 426 { 427 427 uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; 428 428 uinfo->count = 2; ··· 432 430 return 0; 433 431 } 434 432 435 - static int snd_dummy_volume_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 433 + static int snd_dummy_volume_get(struct snd_kcontrol *kcontrol, 434 + struct snd_ctl_elem_value *ucontrol) 436 435 { 437 - snd_card_dummy_t *dummy = snd_kcontrol_chip(kcontrol); 436 + struct snd_dummy *dummy = snd_kcontrol_chip(kcontrol); 438 437 int addr = kcontrol->private_value; 439 438 440 439 spin_lock_irq(&dummy->mixer_lock); ··· 445 442 return 0; 446 443 } 447 444 448 - static int snd_dummy_volume_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 445 + static int snd_dummy_volume_put(struct snd_kcontrol *kcontrol, 446 + struct snd_ctl_elem_value *ucontrol) 449 447 { 450 - snd_card_dummy_t *dummy = snd_kcontrol_chip(kcontrol); 448 + struct snd_dummy *dummy = snd_kcontrol_chip(kcontrol); 451 449 int change, addr = kcontrol->private_value; 452 450 int left, right; 453 451 ··· 477 473 .get = snd_dummy_capsrc_get, .put = snd_dummy_capsrc_put, \ 478 474 .private_value = addr } 479 475 480 - static int snd_dummy_capsrc_info(snd_kcontrol_t * kcontrol, snd_ctl_elem_info_t * uinfo) 476 + static int snd_dummy_capsrc_info(struct snd_kcontrol *kcontrol, 477 + struct snd_ctl_elem_info *uinfo) 481 478 { 482 479 uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; 483 480 uinfo->count = 2; ··· 487 482 return 0; 488 483 } 489 484 490 - static int snd_dummy_capsrc_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 485 + static int snd_dummy_capsrc_get(struct snd_kcontrol *kcontrol, 486 + struct snd_ctl_elem_value *ucontrol) 491 487 { 492 - snd_card_dummy_t *dummy = snd_kcontrol_chip(kcontrol); 488 + struct snd_dummy *dummy = snd_kcontrol_chip(kcontrol); 493 489 int addr = kcontrol->private_value; 494 490 495 491 spin_lock_irq(&dummy->mixer_lock); ··· 500 494 return 0; 501 495 } 502 496 503 - static int snd_dummy_capsrc_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) 497 + static int snd_dummy_capsrc_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) 504 498 { 505 - snd_card_dummy_t *dummy = snd_kcontrol_chip(kcontrol); 499 + struct snd_dummy *dummy = snd_kcontrol_chip(kcontrol); 506 500 int change, addr = kcontrol->private_value; 507 501 int left, right; 508 502 ··· 517 511 return change; 518 512 } 519 513 520 - static snd_kcontrol_new_t snd_dummy_controls[] = { 514 + static struct snd_kcontrol_new snd_dummy_controls[] = { 521 515 DUMMY_VOLUME("Master Volume", 0, MIXER_ADDR_MASTER), 522 516 DUMMY_CAPSRC("Master Capture Switch", 0, MIXER_ADDR_MASTER), 523 517 DUMMY_VOLUME("Synth Volume", 0, MIXER_ADDR_SYNTH), ··· 530 524 DUMMY_CAPSRC("CD Capture Switch", 0, MIXER_ADDR_MASTER) 531 525 }; 532 526 533 - static int __init snd_card_dummy_new_mixer(snd_card_dummy_t * dummy) 527 + static int __init snd_card_dummy_new_mixer(struct snd_dummy *dummy) 534 528 { 535 - snd_card_t *card = dummy->card; 529 + struct snd_card *card = dummy->card; 536 530 unsigned int idx; 537 531 int err; 538 532 ··· 549 543 550 544 static int __init snd_card_dummy_probe(int dev) 551 545 { 552 - snd_card_t *card; 553 - struct snd_card_dummy *dummy; 546 + struct snd_card *card; 547 + struct snd_dummy *dummy; 554 548 int idx, err; 555 549 556 550 if (!enable[dev]) 557 551 return -ENODEV; 558 552 card = snd_card_new(index[dev], id[dev], THIS_MODULE, 559 - sizeof(struct snd_card_dummy)); 553 + sizeof(struct snd_dummy)); 560 554 if (card == NULL) 561 555 return -ENOMEM; 562 - dummy = (struct snd_card_dummy *)card->private_data; 556 + dummy = card->private_data; 563 557 dummy->card = card; 564 558 for (idx = 0; idx < MAX_PCM_DEVICES && idx < pcm_devs[dev]; idx++) { 565 559 if (pcm_substreams[dev] < 1)
+19 -19
sound/drivers/mtpav.c
··· 130 130 u8 hwport; 131 131 u8 mode; 132 132 u8 running_status; 133 - snd_rawmidi_substream_t *input; 134 - snd_rawmidi_substream_t *output; 133 + struct snd_rawmidi_substream *input; 134 + struct snd_rawmidi_substream *output; 135 135 } mtpav_port_t; 136 136 137 137 typedef struct mtpav { 138 - snd_card_t *card; 138 + struct snd_card *card; 139 139 unsigned long port; 140 140 struct resource *res_port; 141 141 int irq; /* interrupt (for inputs) */ ··· 143 143 int share_irq; /* number of accesses to input interrupts */ 144 144 int istimer; /* number of accesses to timer interrupts */ 145 145 struct timer_list timer; /* timer interrupts for outputs */ 146 - snd_rawmidi_t *rmidi; 146 + struct snd_rawmidi *rmidi; 147 147 int num_ports; /* number of hw ports (1-8) */ 148 148 mtpav_port_t ports[NUMPORTS]; /* all ports including computer, adat and bc */ 149 149 ··· 292 292 293 293 /* call this with spin lock held */ 294 294 static void snd_mtpav_output_port_write(mtpav_port_t *port, 295 - snd_rawmidi_substream_t *substream) 295 + struct snd_rawmidi_substream *substream) 296 296 { 297 297 u8 outbyte; 298 298 ··· 324 324 } while (snd_rawmidi_transmit(substream, &outbyte, 1) == 1); 325 325 } 326 326 327 - static void snd_mtpav_output_write(snd_rawmidi_substream_t * substream) 327 + static void snd_mtpav_output_write(struct snd_rawmidi_substream *substream) 328 328 { 329 329 mtpav_port_t *port = &mtp_card->ports[substream->number]; 330 330 unsigned long flags; ··· 353 353 /* 354 354 */ 355 355 356 - static int snd_mtpav_input_open(snd_rawmidi_substream_t * substream) 356 + static int snd_mtpav_input_open(struct snd_rawmidi_substream *substream) 357 357 { 358 358 unsigned long flags; 359 359 mtpav_port_t *portp = &mtp_card->ports[substream->number]; ··· 371 371 /* 372 372 */ 373 373 374 - static int snd_mtpav_input_close(snd_rawmidi_substream_t *substream) 374 + static int snd_mtpav_input_close(struct snd_rawmidi_substream *substream) 375 375 { 376 376 unsigned long flags; 377 377 mtpav_port_t *portp = &mtp_card->ports[substream->number]; ··· 392 392 /* 393 393 */ 394 394 395 - static void snd_mtpav_input_trigger(snd_rawmidi_substream_t * substream, int up) 395 + static void snd_mtpav_input_trigger(struct snd_rawmidi_substream *substream, int up) 396 396 { 397 397 unsigned long flags; 398 398 mtpav_port_t *portp = &mtp_card->ports[substream->number]; ··· 449 449 /* 450 450 */ 451 451 452 - static int snd_mtpav_output_open(snd_rawmidi_substream_t * substream) 452 + static int snd_mtpav_output_open(struct snd_rawmidi_substream *substream) 453 453 { 454 454 unsigned long flags; 455 455 mtpav_port_t *portp = &mtp_card->ports[substream->number]; ··· 464 464 /* 465 465 */ 466 466 467 - static int snd_mtpav_output_close(snd_rawmidi_substream_t * substream) 467 + static int snd_mtpav_output_close(struct snd_rawmidi_substream *substream) 468 468 { 469 469 unsigned long flags; 470 470 mtpav_port_t *portp = &mtp_card->ports[substream->number]; ··· 479 479 /* 480 480 */ 481 481 482 - static void snd_mtpav_output_trigger(snd_rawmidi_substream_t * substream, int up) 482 + static void snd_mtpav_output_trigger(struct snd_rawmidi_substream *substream, int up) 483 483 { 484 484 unsigned long flags; 485 485 mtpav_port_t *portp = &mtp_card->ports[substream->number]; ··· 611 611 /* 612 612 */ 613 613 614 - static snd_rawmidi_ops_t snd_mtpav_output = { 614 + static struct snd_rawmidi_ops snd_mtpav_output = { 615 615 .open = snd_mtpav_output_open, 616 616 .close = snd_mtpav_output_close, 617 617 .trigger = snd_mtpav_output_trigger, 618 618 }; 619 619 620 - static snd_rawmidi_ops_t snd_mtpav_input = { 620 + static struct snd_rawmidi_ops snd_mtpav_input = { 621 621 .open = snd_mtpav_input_open, 622 622 .close = snd_mtpav_input_close, 623 623 .trigger = snd_mtpav_input_trigger, ··· 628 628 * get RAWMIDI resources 629 629 */ 630 630 631 - static void snd_mtpav_set_name(mtpav_t *chip, snd_rawmidi_substream_t *substream) 631 + static void snd_mtpav_set_name(mtpav_t *chip, struct snd_rawmidi_substream *substream) 632 632 { 633 633 if (substream->number >= 0 && substream->number < chip->num_ports) 634 634 sprintf(substream->name, "MTP direct %d", (substream->number % chip->num_ports) + 1); ··· 645 645 static int snd_mtpav_get_RAWMIDI(mtpav_t * mcard) 646 646 { 647 647 int rval = 0; 648 - snd_rawmidi_t *rawmidi; 649 - snd_rawmidi_substream_t *substream; 648 + struct snd_rawmidi *rawmidi; 649 + struct snd_rawmidi_substream *substream; 650 650 struct list_head *list; 651 651 652 652 //printk("entering snd_mtpav_get_RAWMIDI\n"); ··· 666 666 rawmidi = mcard->rmidi; 667 667 668 668 list_for_each(list, &rawmidi->streams[SNDRV_RAWMIDI_STREAM_INPUT].substreams) { 669 - substream = list_entry(list, snd_rawmidi_substream_t, list); 669 + substream = list_entry(list, struct snd_rawmidi_substream, list); 670 670 snd_mtpav_set_name(mcard, substream); 671 671 substream->ops = &snd_mtpav_input; 672 672 } 673 673 list_for_each(list, &rawmidi->streams[SNDRV_RAWMIDI_STREAM_OUTPUT].substreams) { 674 - substream = list_entry(list, snd_rawmidi_substream_t, list); 674 + substream = list_entry(list, struct snd_rawmidi_substream, list); 675 675 snd_mtpav_set_name(mcard, substream); 676 676 substream->ops = &snd_mtpav_output; 677 677 mcard->ports[substream->number].hwport = translate_subdevice_to_hwport(mcard, substream->number);
+23 -23
sound/drivers/serial-u16550.c
··· 116 116 #define SERIAL_MODE_OUTPUT_TRIGGERED (1 << 3) 117 117 118 118 typedef struct _snd_uart16550 { 119 - snd_card_t *card; 120 - snd_rawmidi_t *rmidi; 121 - snd_rawmidi_substream_t *midi_output[SNDRV_SERIAL_MAX_OUTS]; 122 - snd_rawmidi_substream_t *midi_input[SNDRV_SERIAL_MAX_INS]; 119 + struct snd_card *card; 120 + struct snd_rawmidi *rmidi; 121 + struct snd_rawmidi_substream *midi_output[SNDRV_SERIAL_MAX_OUTS]; 122 + struct snd_rawmidi_substream *midi_input[SNDRV_SERIAL_MAX_INS]; 123 123 124 124 int filemode; //open status of file 125 125 ··· 166 166 167 167 } snd_uart16550_t; 168 168 169 - static snd_card_t *snd_serial_cards[SNDRV_CARDS] = SNDRV_DEFAULT_PTR; 169 + static struct snd_card *snd_serial_cards[SNDRV_CARDS] = SNDRV_DEFAULT_PTR; 170 170 171 171 static inline void snd_uart16550_add_timer(snd_uart16550_t *uart) 172 172 { ··· 509 509 } 510 510 } 511 511 512 - static int snd_uart16550_input_open(snd_rawmidi_substream_t * substream) 512 + static int snd_uart16550_input_open(struct snd_rawmidi_substream *substream) 513 513 { 514 514 unsigned long flags; 515 515 snd_uart16550_t *uart = substream->rmidi->private_data; ··· 523 523 return 0; 524 524 } 525 525 526 - static int snd_uart16550_input_close(snd_rawmidi_substream_t * substream) 526 + static int snd_uart16550_input_close(struct snd_rawmidi_substream *substream) 527 527 { 528 528 unsigned long flags; 529 529 snd_uart16550_t *uart = substream->rmidi->private_data; ··· 537 537 return 0; 538 538 } 539 539 540 - static void snd_uart16550_input_trigger(snd_rawmidi_substream_t * substream, int up) 540 + static void snd_uart16550_input_trigger(struct snd_rawmidi_substream *substream, int up) 541 541 { 542 542 unsigned long flags; 543 543 snd_uart16550_t *uart = substream->rmidi->private_data; ··· 551 551 spin_unlock_irqrestore(&uart->open_lock, flags); 552 552 } 553 553 554 - static int snd_uart16550_output_open(snd_rawmidi_substream_t * substream) 554 + static int snd_uart16550_output_open(struct snd_rawmidi_substream *substream) 555 555 { 556 556 unsigned long flags; 557 557 snd_uart16550_t *uart = substream->rmidi->private_data; ··· 565 565 return 0; 566 566 }; 567 567 568 - static int snd_uart16550_output_close(snd_rawmidi_substream_t * substream) 568 + static int snd_uart16550_output_close(struct snd_rawmidi_substream *substream) 569 569 { 570 570 unsigned long flags; 571 571 snd_uart16550_t *uart = substream->rmidi->private_data; ··· 603 603 return 0; 604 604 } 605 605 606 - static int snd_uart16550_output_byte(snd_uart16550_t *uart, snd_rawmidi_substream_t * substream, unsigned char midi_byte) 606 + static int snd_uart16550_output_byte(snd_uart16550_t *uart, struct snd_rawmidi_substream *substream, unsigned char midi_byte) 607 607 { 608 608 if (uart->buff_in_count == 0 /* Buffer empty? */ 609 609 && ((uart->adaptor != SNDRV_SERIAL_MS124W_SA && ··· 636 636 return 1; 637 637 } 638 638 639 - static void snd_uart16550_output_write(snd_rawmidi_substream_t * substream) 639 + static void snd_uart16550_output_write(struct snd_rawmidi_substream *substream) 640 640 { 641 641 unsigned long flags; 642 642 unsigned char midi_byte, addr_byte; ··· 715 715 spin_unlock_irqrestore(&uart->open_lock, flags); 716 716 } 717 717 718 - static void snd_uart16550_output_trigger(snd_rawmidi_substream_t * substream, int up) 718 + static void snd_uart16550_output_trigger(struct snd_rawmidi_substream *substream, int up) 719 719 { 720 720 unsigned long flags; 721 721 snd_uart16550_t *uart = substream->rmidi->private_data; ··· 731 731 snd_uart16550_output_write(substream); 732 732 } 733 733 734 - static snd_rawmidi_ops_t snd_uart16550_output = 734 + static struct snd_rawmidi_ops snd_uart16550_output = 735 735 { 736 736 .open = snd_uart16550_output_open, 737 737 .close = snd_uart16550_output_close, 738 738 .trigger = snd_uart16550_output_trigger, 739 739 }; 740 740 741 - static snd_rawmidi_ops_t snd_uart16550_input = 741 + static struct snd_rawmidi_ops snd_uart16550_input = 742 742 { 743 743 .open = snd_uart16550_input_open, 744 744 .close = snd_uart16550_input_close, ··· 754 754 return 0; 755 755 }; 756 756 757 - static int snd_uart16550_dev_free(snd_device_t *device) 757 + static int snd_uart16550_dev_free(struct snd_device *device) 758 758 { 759 759 snd_uart16550_t *uart = device->device_data; 760 760 return snd_uart16550_free(uart); 761 761 } 762 762 763 - static int __init snd_uart16550_create(snd_card_t * card, 763 + static int __init snd_uart16550_create(struct snd_card *card, 764 764 unsigned long iobase, 765 765 int irq, 766 766 unsigned int speed, ··· 769 769 int droponfull, 770 770 snd_uart16550_t **ruart) 771 771 { 772 - static snd_device_ops_t ops = { 772 + static struct snd_device_ops ops = { 773 773 .dev_free = snd_uart16550_dev_free, 774 774 }; 775 775 snd_uart16550_t *uart; ··· 838 838 return 0; 839 839 } 840 840 841 - static void __init snd_uart16550_substreams(snd_rawmidi_str_t *stream) 841 + static void __init snd_uart16550_substreams(struct snd_rawmidi_str *stream) 842 842 { 843 843 struct list_head *list; 844 844 845 845 list_for_each(list, &stream->substreams) { 846 - snd_rawmidi_substream_t *substream = list_entry(list, snd_rawmidi_substream_t, list); 846 + struct snd_rawmidi_substream *substream = list_entry(list, struct snd_rawmidi_substream, list); 847 847 sprintf(substream->name, "Serial MIDI %d", substream->number + 1); 848 848 } 849 849 } 850 850 851 - static int __init snd_uart16550_rmidi(snd_uart16550_t *uart, int device, int outs, int ins, snd_rawmidi_t **rmidi) 851 + static int __init snd_uart16550_rmidi(snd_uart16550_t *uart, int device, int outs, int ins, struct snd_rawmidi **rmidi) 852 852 { 853 - snd_rawmidi_t *rrawmidi; 853 + struct snd_rawmidi *rrawmidi; 854 854 int err; 855 855 856 856 if ((err = snd_rawmidi_new(uart->card, "UART Serial MIDI", device, outs, ins, &rrawmidi)) < 0) ··· 871 871 872 872 static int __init snd_serial_probe(int dev) 873 873 { 874 - snd_card_t *card; 874 + struct snd_card *card; 875 875 snd_uart16550_t *uart; 876 876 int err; 877 877
+8 -8
sound/drivers/virmidi.c
··· 75 75 module_param_array(midi_devs, int, NULL, 0444); 76 76 MODULE_PARM_DESC(midi_devs, "MIDI devices # (1-8)"); 77 77 78 - typedef struct snd_card_virmidi { 79 - snd_card_t *card; 80 - snd_rawmidi_t *midi[MAX_MIDI_DEVICES]; 81 - } snd_card_virmidi_t; 78 + struct snd_card_virmidi { 79 + struct snd_card *card; 80 + struct snd_rawmidi *midi[MAX_MIDI_DEVICES]; 81 + }; 82 82 83 - static snd_card_t *snd_virmidi_cards[SNDRV_CARDS] = SNDRV_DEFAULT_PTR; 83 + static struct snd_card *snd_virmidi_cards[SNDRV_CARDS] = SNDRV_DEFAULT_PTR; 84 84 85 85 86 86 static int __init snd_card_virmidi_probe(int dev) 87 87 { 88 - snd_card_t *card; 88 + struct snd_card *card; 89 89 struct snd_card_virmidi *vmidi; 90 90 int idx, err; 91 91 ··· 103 103 midi_devs[dev] = MAX_MIDI_DEVICES; 104 104 } 105 105 for (idx = 0; idx < midi_devs[dev]; idx++) { 106 - snd_rawmidi_t *rmidi; 107 - snd_virmidi_dev_t *rdev; 106 + struct snd_rawmidi *rmidi; 107 + struct snd_virmidi_dev *rdev; 108 108 if ((err = snd_virmidi_new(card, idx, &rmidi)) < 0) 109 109 goto __nodev; 110 110 rdev = rmidi->private_data;