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.c24
1 files changed, 15 insertions, 9 deletions
diff --git a/sound/drivers/serial-u16550.c b/sound/drivers/serial-u16550.c
index d8aab9da97c2..b2b6d50c9425 100644
--- a/sound/drivers/serial-u16550.c
+++ b/sound/drivers/serial-u16550.c
@@ -241,7 +241,8 @@ static void snd_uart16550_io_loop(struct snd_uart16550 * uart)
241 snd_rawmidi_receive(uart->midi_input[substream], &c, 1); 241 snd_rawmidi_receive(uart->midi_input[substream], &c, 1);
242 242
243 if (status & UART_LSR_OE) 243 if (status & UART_LSR_OE)
244 snd_printk("%s: Overrun on device at 0x%lx\n", 244 snd_printk(KERN_WARNING
245 "%s: Overrun on device at 0x%lx\n",
245 uart->rmidi->name, uart->base); 246 uart->rmidi->name, uart->base);
246 } 247 }
247 248
@@ -636,7 +637,8 @@ static int snd_uart16550_output_byte(struct snd_uart16550 *uart,
636 } 637 }
637 } else { 638 } else {
638 if (!snd_uart16550_write_buffer(uart, midi_byte)) { 639 if (!snd_uart16550_write_buffer(uart, midi_byte)) {
639 snd_printk("%s: Buffer overrun on device at 0x%lx\n", 640 snd_printk(KERN_WARNING
641 "%s: Buffer overrun on device at 0x%lx\n",
640 uart->rmidi->name, uart->base); 642 uart->rmidi->name, uart->base);
641 return 0; 643 return 0;
642 } 644 }
@@ -815,7 +817,8 @@ static int __devinit snd_uart16550_create(struct snd_card *card,
815 if (irq >= 0 && irq != SNDRV_AUTO_IRQ) { 817 if (irq >= 0 && irq != SNDRV_AUTO_IRQ) {
816 if (request_irq(irq, snd_uart16550_interrupt, 818 if (request_irq(irq, snd_uart16550_interrupt,
817 IRQF_DISABLED, "Serial MIDI", uart)) { 819 IRQF_DISABLED, "Serial MIDI", uart)) {
818 snd_printk("irq %d busy. Using Polling.\n", irq); 820 snd_printk(KERN_WARNING
821 "irq %d busy. Using Polling.\n", irq);
819 } else { 822 } else {
820 uart->irq = irq; 823 uart->irq = irq;
821 } 824 }
@@ -919,26 +922,29 @@ static int __devinit snd_serial_probe(struct platform_device *devptr)
919 case SNDRV_SERIAL_GENERIC: 922 case SNDRV_SERIAL_GENERIC:
920 break; 923 break;
921 default: 924 default:
922 snd_printk("Adaptor type is out of range 0-%d (%d)\n", 925 snd_printk(KERN_ERR
926 "Adaptor type is out of range 0-%d (%d)\n",
923 SNDRV_SERIAL_MAX_ADAPTOR, adaptor[dev]); 927 SNDRV_SERIAL_MAX_ADAPTOR, adaptor[dev]);
924 return -ENODEV; 928 return -ENODEV;
925 } 929 }
926 930
927 if (outs[dev] < 1 || outs[dev] > SNDRV_SERIAL_MAX_OUTS) { 931 if (outs[dev] < 1 || outs[dev] > SNDRV_SERIAL_MAX_OUTS) {
928 snd_printk("Count of outputs is out of range 1-%d (%d)\n", 932 snd_printk(KERN_ERR
933 "Count of outputs is out of range 1-%d (%d)\n",
929 SNDRV_SERIAL_MAX_OUTS, outs[dev]); 934 SNDRV_SERIAL_MAX_OUTS, outs[dev]);
930 return -ENODEV; 935 return -ENODEV;
931 } 936 }
932 937
933 if (ins[dev] < 1 || ins[dev] > SNDRV_SERIAL_MAX_INS) { 938 if (ins[dev] < 1 || ins[dev] > SNDRV_SERIAL_MAX_INS) {
934 snd_printk("Count of inputs is out of range 1-%d (%d)\n", 939 snd_printk(KERN_ERR
940 "Count of inputs is out of range 1-%d (%d)\n",
935 SNDRV_SERIAL_MAX_INS, ins[dev]); 941 SNDRV_SERIAL_MAX_INS, ins[dev]);
936 return -ENODEV; 942 return -ENODEV;
937 } 943 }
938 944
939 card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0); 945 err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card);
940 if (card == NULL) 946 if (err < 0)
941 return -ENOMEM; 947 return err;
942 948
943 strcpy(card->driver, "Serial"); 949 strcpy(card->driver, "Serial");
944 strcpy(card->shortname, "Serial MIDI (UART16550A)"); 950 strcpy(card->shortname, "Serial MIDI (UART16550A)");