ALSA: Add missing KERN_* prefix to printk in sound/drivers
authorTakashi Iwai <tiwai@suse.de>
Thu, 5 Feb 2009 14:51:50 +0000 (15:51 +0100)
committerTakashi Iwai <tiwai@suse.de>
Thu, 5 Feb 2009 15:00:56 +0000 (16:00 +0100)
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/drivers/mtpav.c
sound/drivers/mts64.c
sound/drivers/opl3/opl3_lib.c
sound/drivers/opl3/opl3_midi.c
sound/drivers/opl3/opl3_oss.c
sound/drivers/opl3/opl3_synth.c
sound/drivers/pcsp/pcsp.c
sound/drivers/serial-u16550.c
sound/drivers/virmidi.c
sound/drivers/vx/vx_core.c

index 5b89c0883d6081b8d5b8b854d72585ef345f6c55..6b26305ff0e673def576f69a3d80c38773316c98 100644 (file)
@@ -303,8 +303,10 @@ static void snd_mtpav_output_port_write(struct mtpav *mtp_card,
 
                snd_mtpav_send_byte(mtp_card, 0xf5);
                snd_mtpav_send_byte(mtp_card, portp->hwport);
-               //snd_printk("new outport: 0x%x\n", (unsigned int) portp->hwport);
-
+               /*
+               snd_printk(KERN_DEBUG "new outport: 0x%x\n",
+                          (unsigned int) portp->hwport);
+               */
                if (!(outbyte & 0x80) && portp->running_status)
                        snd_mtpav_send_byte(mtp_card, portp->running_status);
        }
@@ -540,7 +542,7 @@ static void snd_mtpav_read_bytes(struct mtpav *mcrd)
 
        u8 sbyt = snd_mtpav_getreg(mcrd, SREG);
 
-       //printk("snd_mtpav_read_bytes() sbyt: 0x%x\n", sbyt);
+       /* printk(KERN_DEBUG "snd_mtpav_read_bytes() sbyt: 0x%x\n", sbyt); */
 
        if (!(sbyt & SIGS_BYTE))
                return;
@@ -585,12 +587,12 @@ static irqreturn_t snd_mtpav_irqh(int irq, void *dev_id)
 static int __devinit snd_mtpav_get_ISA(struct mtpav * mcard)
 {
        if ((mcard->res_port = request_region(port, 3, "MotuMTPAV MIDI")) == NULL) {
-               snd_printk("MTVAP port 0x%lx is busy\n", port);
+               snd_printk(KERN_ERR "MTVAP port 0x%lx is busy\n", port);
                return -EBUSY;
        }
        mcard->port = port;
        if (request_irq(irq, snd_mtpav_irqh, IRQF_DISABLED, "MOTU MTPAV", mcard)) {
-               snd_printk("MTVAP IRQ %d busy\n", irq);
+               snd_printk(KERN_ERR "MTVAP IRQ %d busy\n", irq);
                return -EBUSY;
        }
        mcard->irq = irq;
index 87ba1ddc01151fdfb5bd8f38d80103a68964aa5a..1a05b2d64c9b3b278175654c643c2a7bbb5ed00d 100644 (file)
@@ -1015,7 +1015,7 @@ static int __devinit snd_mts64_probe(struct platform_device *pdev)
                goto __err;
        }
 
-       snd_printk("ESI Miditerminal 4140 on 0x%lx\n", p->base);
+       snd_printk(KERN_INFO "ESI Miditerminal 4140 on 0x%lx\n", p->base);
        return 0;
 
 __err:
index 780582340fefab73e11930775edc81fcda2ff9f6..6e31e46ca3934f46b8a8cef2ffa8215a69d3c8e8 100644 (file)
@@ -302,7 +302,7 @@ void snd_opl3_interrupt(struct snd_hwdep * hw)
        opl3 = hw->private_data;
        status = inb(opl3->l_port);
 #if 0
-       snd_printk("AdLib IRQ status = 0x%x\n", status);
+       snd_printk(KERN_DEBUG "AdLib IRQ status = 0x%x\n", status);
 #endif
        if (!(status & 0x80))
                return;
index 16feafa2c51e872cfb6266b3882e76b407c1180e..6e7d09ae0e82310fa053155c43ec2b9c11d1d084 100644 (file)
@@ -125,7 +125,7 @@ static void debug_alloc(struct snd_opl3 *opl3, char *s, int voice) {
        int i;
        char *str = "x.24";
 
-       printk("time %.5i: %s [%.2i]: ", opl3->use_time, s, voice);
+       printk(KERN_DEBUG "time %.5i: %s [%.2i]: ", opl3->use_time, s, voice);
        for (i = 0; i < opl3->max_voices; i++)
                printk("%c", *(str + opl3->voices[i].state + 1));
        printk("\n");
@@ -218,7 +218,7 @@ static int opl3_get_voice(struct snd_opl3 *opl3, int instr_4op,
        for (i = 0; i < END; i++) {
                if (best[i].voice >= 0) {
 #ifdef DEBUG_ALLOC
-                       printk("%s %iop allocation on voice %i\n",
+                       printk(KERN_DEBUG "%s %iop allocation on voice %i\n",
                               alloc_type[i], instr_4op ? 4 : 2,
                               best[i].voice);
 #endif
@@ -317,7 +317,7 @@ void snd_opl3_note_on(void *p, int note, int vel, struct snd_midi_channel *chan)
        opl3 = p;
 
 #ifdef DEBUG_MIDI
-       snd_printk("Note on, ch %i, inst %i, note %i, vel %i\n",
+       snd_printk(KERN_DEBUG "Note on, ch %i, inst %i, note %i, vel %i\n",
                   chan->number, chan->midi_program, note, vel);
 #endif
 
@@ -372,7 +372,7 @@ void snd_opl3_note_on(void *p, int note, int vel, struct snd_midi_channel *chan)
                return;
        }
 #ifdef DEBUG_MIDI
-       snd_printk("  --> OPL%i instrument: %s\n",
+       snd_printk(KERN_DEBUG "  --> OPL%i instrument: %s\n",
                   instr_4op ? 3 : 2, patch->name);
 #endif
        /* in SYNTH mode, application takes care of voices */
@@ -431,7 +431,7 @@ void snd_opl3_note_on(void *p, int note, int vel, struct snd_midi_channel *chan)
        }
 
 #ifdef DEBUG_MIDI
-       snd_printk("  --> setting OPL3 connection: 0x%x\n",
+       snd_printk(KERN_DEBUG "  --> setting OPL3 connection: 0x%x\n",
                   opl3->connection_reg);
 #endif
        /*
@@ -466,7 +466,7 @@ void snd_opl3_note_on(void *p, int note, int vel, struct snd_midi_channel *chan)
        /* Program the FM voice characteristics */
        for (i = 0; i < (instr_4op ? 4 : 2); i++) {
 #ifdef DEBUG_MIDI
-               snd_printk("  --> programming operator %i\n", i);
+               snd_printk(KERN_DEBUG "  --> programming operator %i\n", i);
 #endif
                op_offset = snd_opl3_regmap[voice_offset][i];
 
@@ -546,7 +546,7 @@ void snd_opl3_note_on(void *p, int note, int vel, struct snd_midi_channel *chan)
        blocknum |= OPL3_KEYON_BIT;
 
 #ifdef DEBUG_MIDI
-       snd_printk("  --> trigger voice %i\n", voice);
+       snd_printk(KERN_DEBUG "  --> trigger voice %i\n", voice);
 #endif
        /* Set OPL3 KEYON_BLOCK register of requested voice */ 
        opl3_reg = reg_side | (OPL3_REG_KEYON_BLOCK + voice_offset);
@@ -602,7 +602,7 @@ void snd_opl3_note_on(void *p, int note, int vel, struct snd_midi_channel *chan)
                        prg = extra_prg - 1;
                }
 #ifdef DEBUG_MIDI
-               snd_printk(" *** allocating extra program\n");
+               snd_printk(KERN_DEBUG " *** allocating extra program\n");
 #endif
                goto __extra_prg;
        }
@@ -633,7 +633,7 @@ static void snd_opl3_kill_voice(struct snd_opl3 *opl3, int voice)
 
        /* kill voice */
 #ifdef DEBUG_MIDI
-       snd_printk("  --> kill voice %i\n", voice);
+       snd_printk(KERN_DEBUG "  --> kill voice %i\n", voice);
 #endif
        opl3_reg = reg_side | (OPL3_REG_KEYON_BLOCK + voice_offset);
        /* clear Key ON bit */
@@ -670,7 +670,7 @@ void snd_opl3_note_off(void *p, int note, int vel, struct snd_midi_channel *chan
        opl3 = p;
 
 #ifdef DEBUG_MIDI
-       snd_printk("Note off, ch %i, inst %i, note %i\n",
+       snd_printk(KERN_DEBUG "Note off, ch %i, inst %i, note %i\n",
                   chan->number, chan->midi_program, note);
 #endif
 
@@ -709,7 +709,7 @@ void snd_opl3_key_press(void *p, int note, int vel, struct snd_midi_channel *cha
 
        opl3 = p;
 #ifdef DEBUG_MIDI
-       snd_printk("Key pressure, ch#: %i, inst#: %i\n",
+       snd_printk(KERN_DEBUG "Key pressure, ch#: %i, inst#: %i\n",
                   chan->number, chan->midi_program);
 #endif
 }
@@ -723,7 +723,7 @@ void snd_opl3_terminate_note(void *p, int note, struct snd_midi_channel *chan)
 
        opl3 = p;
 #ifdef DEBUG_MIDI
-       snd_printk("Terminate note, ch#: %i, inst#: %i\n",
+       snd_printk(KERN_DEBUG "Terminate note, ch#: %i, inst#: %i\n",
                   chan->number, chan->midi_program);
 #endif
 }
@@ -812,7 +812,7 @@ void snd_opl3_control(void *p, int type, struct snd_midi_channel *chan)
 
        opl3 = p;
 #ifdef DEBUG_MIDI
-       snd_printk("Controller, TYPE = %i, ch#: %i, inst#: %i\n",
+       snd_printk(KERN_DEBUG "Controller, TYPE = %i, ch#: %i, inst#: %i\n",
                   type, chan->number, chan->midi_program);
 #endif
 
@@ -849,7 +849,7 @@ void snd_opl3_nrpn(void *p, struct snd_midi_channel *chan,
 
        opl3 = p;
 #ifdef DEBUG_MIDI
-       snd_printk("NRPN, ch#: %i, inst#: %i\n",
+       snd_printk(KERN_DEBUG "NRPN, ch#: %i, inst#: %i\n",
                   chan->number, chan->midi_program);
 #endif
 }
@@ -864,6 +864,6 @@ void snd_opl3_sysex(void *p, unsigned char *buf, int len,
 
        opl3 = p;
 #ifdef DEBUG_MIDI
-       snd_printk("SYSEX\n");
+       snd_printk(KERN_DEBUG "SYSEX\n");
 #endif
 }
index 9a2271dc046a653e7f80077108bd6c19b2c3e6a7..a54b1dc5cc7859f7b10316aed9fce1af5b9c391f 100644 (file)
@@ -220,14 +220,14 @@ static int snd_opl3_load_patch_seq_oss(struct snd_seq_oss_arg *arg, int format,
                return -EINVAL;
 
        if (count < (int)sizeof(sbi)) {
-               snd_printk("FM Error: Patch record too short\n");
+               snd_printk(KERN_ERR "FM Error: Patch record too short\n");
                return -EINVAL;
        }
        if (copy_from_user(&sbi, buf, sizeof(sbi)))
                return -EFAULT;
 
        if (sbi.channel < 0 || sbi.channel >= SBFM_MAXINSTR) {
-               snd_printk("FM Error: Invalid instrument number %d\n",
+               snd_printk(KERN_ERR "FM Error: Invalid instrument number %d\n",
                           sbi.channel);
                return -EINVAL;
        }
@@ -254,7 +254,9 @@ static int snd_opl3_ioctl_seq_oss(struct snd_seq_oss_arg *arg, unsigned int cmd,
        opl3 = arg->private_data;
        switch (cmd) {
                case SNDCTL_FM_LOAD_INSTR:
-                       snd_printk("OPL3: Obsolete ioctl(SNDCTL_FM_LOAD_INSTR) used. Fix the program.\n");
+                       snd_printk(KERN_ERR "OPL3: "
+                                  "Obsolete ioctl(SNDCTL_FM_LOAD_INSTR) used. "
+                                  "Fix the program.\n");
                        return -EINVAL;
 
                case SNDCTL_SYNTH_MEMAVL:
index 962bb9c8b9c8902b5fd5bcaa111a515b8cc71fe8..6d57b6441dec53312de691a6caeb835ae2ef607d 100644 (file)
@@ -168,7 +168,7 @@ int snd_opl3_ioctl(struct snd_hwdep * hw, struct file *file,
 
 #ifdef CONFIG_SND_DEBUG
        default:
-               snd_printk("unknown IOCTL: 0x%x\n", cmd);
+               snd_printk(KERN_WARNING "unknown IOCTL: 0x%x\n", cmd);
 #endif
        }
        return -ENOTTY;
index a4049eb94d35a28bafa41072e6e44af726d6f251..c7c744c6fc0b39b34c01855f052bcb86fc91b609 100644 (file)
@@ -57,7 +57,7 @@ static int __devinit snd_pcsp_create(struct snd_card *card)
        else
                min_div = MAX_DIV;
 #if PCSP_DEBUG
-       printk("PCSP: lpj=%li, min_div=%i, res=%li\n",
+       printk(KERN_DEBUG "PCSP: lpj=%li, min_div=%i, res=%li\n",
               loops_per_jiffy, min_div, tp.tv_nsec);
 #endif
 
index d8aab9da97c29ad8058f5be9751537b25b043500..ff0a41510945d1056de78797d18626e4570e1c1c 100644 (file)
@@ -241,7 +241,8 @@ static void snd_uart16550_io_loop(struct snd_uart16550 * uart)
                        snd_rawmidi_receive(uart->midi_input[substream], &c, 1);
 
                if (status & UART_LSR_OE)
-                       snd_printk("%s: Overrun on device at 0x%lx\n",
+                       snd_printk(KERN_WARNING
+                                  "%s: Overrun on device at 0x%lx\n",
                               uart->rmidi->name, uart->base);
        }
 
@@ -636,7 +637,8 @@ static int snd_uart16550_output_byte(struct snd_uart16550 *uart,
                }
        } else {
                if (!snd_uart16550_write_buffer(uart, midi_byte)) {
-                       snd_printk("%s: Buffer overrun on device at 0x%lx\n",
+                       snd_printk(KERN_WARNING
+                                  "%s: Buffer overrun on device at 0x%lx\n",
                                   uart->rmidi->name, uart->base);
                        return 0;
                }
@@ -815,7 +817,8 @@ static int __devinit snd_uart16550_create(struct snd_card *card,
        if (irq >= 0 && irq != SNDRV_AUTO_IRQ) {
                if (request_irq(irq, snd_uart16550_interrupt,
                                IRQF_DISABLED, "Serial MIDI", uart)) {
-                       snd_printk("irq %d busy. Using Polling.\n", irq);
+                       snd_printk(KERN_WARNING
+                                  "irq %d busy. Using Polling.\n", irq);
                } else {
                        uart->irq = irq;
                }
@@ -919,19 +922,22 @@ static int __devinit snd_serial_probe(struct platform_device *devptr)
        case SNDRV_SERIAL_GENERIC:
                break;
        default:
-               snd_printk("Adaptor type is out of range 0-%d (%d)\n",
+               snd_printk(KERN_ERR
+                          "Adaptor type is out of range 0-%d (%d)\n",
                           SNDRV_SERIAL_MAX_ADAPTOR, adaptor[dev]);
                return -ENODEV;
        }
 
        if (outs[dev] < 1 || outs[dev] > SNDRV_SERIAL_MAX_OUTS) {
-               snd_printk("Count of outputs is out of range 1-%d (%d)\n",
+               snd_printk(KERN_ERR
+                          "Count of outputs is out of range 1-%d (%d)\n",
                           SNDRV_SERIAL_MAX_OUTS, outs[dev]);
                return -ENODEV;
        }
 
        if (ins[dev] < 1 || ins[dev] > SNDRV_SERIAL_MAX_INS) {
-               snd_printk("Count of inputs is out of range 1-%d (%d)\n",
+               snd_printk(KERN_ERR
+                          "Count of inputs is out of range 1-%d (%d)\n",
                           SNDRV_SERIAL_MAX_INS, ins[dev]);
                return -ENODEV;
        }
index f79e3614079d238aca26df870c863949bbda1e94..1022e365606ff6c5607017c3b467cac0168aba83 100644 (file)
@@ -98,7 +98,9 @@ static int __devinit snd_virmidi_probe(struct platform_device *devptr)
        vmidi->card = card;
 
        if (midi_devs[dev] > MAX_MIDI_DEVICES) {
-               snd_printk("too much midi devices for virmidi %d: force to use %d\n", dev, MAX_MIDI_DEVICES);
+               snd_printk(KERN_WARNING
+                          "too much midi devices for virmidi %d: "
+                          "force to use %d\n", dev, MAX_MIDI_DEVICES);
                midi_devs[dev] = MAX_MIDI_DEVICES;
        }
        for (idx = 0; idx < midi_devs[dev]; idx++) {
index 14e3354be43a4470b1cd241c5649f5fa3c6637f5..19c6e376c7c781abe0ed587da593a50ee6130d74 100644 (file)
@@ -688,7 +688,8 @@ int snd_vx_dsp_load(struct vx_core *chip, const struct firmware *dsp)
                image = dsp->data + i;
                /* Wait DSP ready for a new read */
                if ((err = vx_wait_isr_bit(chip, ISR_TX_EMPTY)) < 0) {
-                       printk("dsp loading error at position %d\n", i);
+                       printk(KERN_ERR
+                              "dsp loading error at position %d\n", i);
                        return err;
                }
                cptr = image;
This page took 0.033407 seconds and 5 git commands to generate.