aboutsummaryrefslogtreecommitdiffstats
path: root/sound/drivers/serial-u16550.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/drivers/serial-u16550.c')
-rw-r--r--sound/drivers/serial-u16550.c46
1 files changed, 23 insertions, 23 deletions
diff --git a/sound/drivers/serial-u16550.c b/sound/drivers/serial-u16550.c
index 1ed58df42671..ec28587247f4 100644
--- a/sound/drivers/serial-u16550.c
+++ b/sound/drivers/serial-u16550.c
@@ -116,10 +116,10 @@ MODULE_PARM_DESC(adaptor, "Type of adaptor.");
116#define SERIAL_MODE_OUTPUT_TRIGGERED (1 << 3) 116#define SERIAL_MODE_OUTPUT_TRIGGERED (1 << 3)
117 117
118typedef struct _snd_uart16550 { 118typedef struct _snd_uart16550 {
119 snd_card_t *card; 119 struct snd_card *card;
120 snd_rawmidi_t *rmidi; 120 struct snd_rawmidi *rmidi;
121 snd_rawmidi_substream_t *midi_output[SNDRV_SERIAL_MAX_OUTS]; 121 struct snd_rawmidi_substream *midi_output[SNDRV_SERIAL_MAX_OUTS];
122 snd_rawmidi_substream_t *midi_input[SNDRV_SERIAL_MAX_INS]; 122 struct snd_rawmidi_substream *midi_input[SNDRV_SERIAL_MAX_INS];
123 123
124 int filemode; //open status of file 124 int filemode; //open status of file
125 125
@@ -166,7 +166,7 @@ typedef struct _snd_uart16550 {
166 166
167} snd_uart16550_t; 167} snd_uart16550_t;
168 168
169static snd_card_t *snd_serial_cards[SNDRV_CARDS] = SNDRV_DEFAULT_PTR; 169static struct snd_card *snd_serial_cards[SNDRV_CARDS] = SNDRV_DEFAULT_PTR;
170 170
171static inline void snd_uart16550_add_timer(snd_uart16550_t *uart) 171static inline void snd_uart16550_add_timer(snd_uart16550_t *uart)
172{ 172{
@@ -509,7 +509,7 @@ static void snd_uart16550_do_close(snd_uart16550_t * uart)
509 } 509 }
510} 510}
511 511
512static int snd_uart16550_input_open(snd_rawmidi_substream_t * substream) 512static int snd_uart16550_input_open(struct snd_rawmidi_substream *substream)
513{ 513{
514 unsigned long flags; 514 unsigned long flags;
515 snd_uart16550_t *uart = substream->rmidi->private_data; 515 snd_uart16550_t *uart = substream->rmidi->private_data;
@@ -523,7 +523,7 @@ static int snd_uart16550_input_open(snd_rawmidi_substream_t * substream)
523 return 0; 523 return 0;
524} 524}
525 525
526static int snd_uart16550_input_close(snd_rawmidi_substream_t * substream) 526static int snd_uart16550_input_close(struct snd_rawmidi_substream *substream)
527{ 527{
528 unsigned long flags; 528 unsigned long flags;
529 snd_uart16550_t *uart = substream->rmidi->private_data; 529 snd_uart16550_t *uart = substream->rmidi->private_data;
@@ -537,7 +537,7 @@ static int snd_uart16550_input_close(snd_rawmidi_substream_t * substream)
537 return 0; 537 return 0;
538} 538}
539 539
540static void snd_uart16550_input_trigger(snd_rawmidi_substream_t * substream, int up) 540static void snd_uart16550_input_trigger(struct snd_rawmidi_substream *substream, int up)
541{ 541{
542 unsigned long flags; 542 unsigned long flags;
543 snd_uart16550_t *uart = substream->rmidi->private_data; 543 snd_uart16550_t *uart = substream->rmidi->private_data;
@@ -551,7 +551,7 @@ static void snd_uart16550_input_trigger(snd_rawmidi_substream_t * substream, int
551 spin_unlock_irqrestore(&uart->open_lock, flags); 551 spin_unlock_irqrestore(&uart->open_lock, flags);
552} 552}
553 553
554static int snd_uart16550_output_open(snd_rawmidi_substream_t * substream) 554static int snd_uart16550_output_open(struct snd_rawmidi_substream *substream)
555{ 555{
556 unsigned long flags; 556 unsigned long flags;
557 snd_uart16550_t *uart = substream->rmidi->private_data; 557 snd_uart16550_t *uart = substream->rmidi->private_data;
@@ -565,7 +565,7 @@ static int snd_uart16550_output_open(snd_rawmidi_substream_t * substream)
565 return 0; 565 return 0;
566}; 566};
567 567
568static int snd_uart16550_output_close(snd_rawmidi_substream_t * substream) 568static int snd_uart16550_output_close(struct snd_rawmidi_substream *substream)
569{ 569{
570 unsigned long flags; 570 unsigned long flags;
571 snd_uart16550_t *uart = substream->rmidi->private_data; 571 snd_uart16550_t *uart = substream->rmidi->private_data;
@@ -603,7 +603,7 @@ static inline int snd_uart16550_write_buffer(snd_uart16550_t *uart, unsigned cha
603 return 0; 603 return 0;
604} 604}
605 605
606static int snd_uart16550_output_byte(snd_uart16550_t *uart, snd_rawmidi_substream_t * substream, unsigned char midi_byte) 606static int snd_uart16550_output_byte(snd_uart16550_t *uart, struct snd_rawmidi_substream *substream, unsigned char midi_byte)
607{ 607{
608 if (uart->buff_in_count == 0 /* Buffer empty? */ 608 if (uart->buff_in_count == 0 /* Buffer empty? */
609 && ((uart->adaptor != SNDRV_SERIAL_MS124W_SA && 609 && ((uart->adaptor != SNDRV_SERIAL_MS124W_SA &&
@@ -636,7 +636,7 @@ static int snd_uart16550_output_byte(snd_uart16550_t *uart, snd_rawmidi_substrea
636 return 1; 636 return 1;
637} 637}
638 638
639static void snd_uart16550_output_write(snd_rawmidi_substream_t * substream) 639static void snd_uart16550_output_write(struct snd_rawmidi_substream *substream)
640{ 640{
641 unsigned long flags; 641 unsigned long flags;
642 unsigned char midi_byte, addr_byte; 642 unsigned char midi_byte, addr_byte;
@@ -715,7 +715,7 @@ static void snd_uart16550_output_write(snd_rawmidi_substream_t * substream)
715 spin_unlock_irqrestore(&uart->open_lock, flags); 715 spin_unlock_irqrestore(&uart->open_lock, flags);
716} 716}
717 717
718static void snd_uart16550_output_trigger(snd_rawmidi_substream_t * substream, int up) 718static void snd_uart16550_output_trigger(struct snd_rawmidi_substream *substream, int up)
719{ 719{
720 unsigned long flags; 720 unsigned long flags;
721 snd_uart16550_t *uart = substream->rmidi->private_data; 721 snd_uart16550_t *uart = substream->rmidi->private_data;
@@ -731,14 +731,14 @@ static void snd_uart16550_output_trigger(snd_rawmidi_substream_t * substream, in
731 snd_uart16550_output_write(substream); 731 snd_uart16550_output_write(substream);
732} 732}
733 733
734static snd_rawmidi_ops_t snd_uart16550_output = 734static struct snd_rawmidi_ops snd_uart16550_output =
735{ 735{
736 .open = snd_uart16550_output_open, 736 .open = snd_uart16550_output_open,
737 .close = snd_uart16550_output_close, 737 .close = snd_uart16550_output_close,
738 .trigger = snd_uart16550_output_trigger, 738 .trigger = snd_uart16550_output_trigger,
739}; 739};
740 740
741static snd_rawmidi_ops_t snd_uart16550_input = 741static struct snd_rawmidi_ops snd_uart16550_input =
742{ 742{
743 .open = snd_uart16550_input_open, 743 .open = snd_uart16550_input_open,
744 .close = snd_uart16550_input_close, 744 .close = snd_uart16550_input_close,
@@ -754,13 +754,13 @@ static int snd_uart16550_free(snd_uart16550_t *uart)
754 return 0; 754 return 0;
755}; 755};
756 756
757static int snd_uart16550_dev_free(snd_device_t *device) 757static int snd_uart16550_dev_free(struct snd_device *device)
758{ 758{
759 snd_uart16550_t *uart = device->device_data; 759 snd_uart16550_t *uart = device->device_data;
760 return snd_uart16550_free(uart); 760 return snd_uart16550_free(uart);
761} 761}
762 762
763static int __init snd_uart16550_create(snd_card_t * card, 763static int __init snd_uart16550_create(struct snd_card *card,
764 unsigned long iobase, 764 unsigned long iobase,
765 int irq, 765 int irq,
766 unsigned int speed, 766 unsigned int speed,
@@ -769,7 +769,7 @@ static int __init snd_uart16550_create(snd_card_t * card,
769 int droponfull, 769 int droponfull,
770 snd_uart16550_t **ruart) 770 snd_uart16550_t **ruart)
771{ 771{
772 static snd_device_ops_t ops = { 772 static struct snd_device_ops ops = {
773 .dev_free = snd_uart16550_dev_free, 773 .dev_free = snd_uart16550_dev_free,
774 }; 774 };
775 snd_uart16550_t *uart; 775 snd_uart16550_t *uart;
@@ -838,19 +838,19 @@ static int __init snd_uart16550_create(snd_card_t * card,
838 return 0; 838 return 0;
839} 839}
840 840
841static void __init snd_uart16550_substreams(snd_rawmidi_str_t *stream) 841static void __init snd_uart16550_substreams(struct snd_rawmidi_str *stream)
842{ 842{
843 struct list_head *list; 843 struct list_head *list;
844 844
845 list_for_each(list, &stream->substreams) { 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 sprintf(substream->name, "Serial MIDI %d", substream->number + 1); 847 sprintf(substream->name, "Serial MIDI %d", substream->number + 1);
848 } 848 }
849} 849}
850 850
851static int __init snd_uart16550_rmidi(snd_uart16550_t *uart, int device, int outs, int ins, snd_rawmidi_t **rmidi) 851static 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 int err; 854 int err;
855 855
856 if ((err = snd_rawmidi_new(uart->card, "UART Serial MIDI", device, outs, ins, &rrawmidi)) < 0) 856 if ((err = snd_rawmidi_new(uart->card, "UART Serial MIDI", device, outs, ins, &rrawmidi)) < 0)
@@ -871,7 +871,7 @@ static int __init snd_uart16550_rmidi(snd_uart16550_t *uart, int device, int out
871 871
872static int __init snd_serial_probe(int dev) 872static int __init snd_serial_probe(int dev)
873{ 873{
874 snd_card_t *card; 874 struct snd_card *card;
875 snd_uart16550_t *uart; 875 snd_uart16550_t *uart;
876 int err; 876 int err;
877 877