Skip to content

Commit

Permalink
[ALSA] Add missing KERN_* suffix to printk
Browse files Browse the repository at this point in the history
Add missing KERN_* suffix to printk.

Signed-off-by: Takashi Iwai <[email protected]>
  • Loading branch information
tiwai authored and Jaroslav Kysela committed Nov 4, 2005
1 parent 8a3fb4d commit 99b359b
Show file tree
Hide file tree
Showing 60 changed files with 299 additions and 299 deletions.
14 changes: 7 additions & 7 deletions sound/i2c/cs8427.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ int snd_cs8427_reg_write(snd_i2c_device_t *device, unsigned char reg, unsigned c
buf[0] = reg & 0x7f;
buf[1] = val;
if ((err = snd_i2c_sendbytes(device, buf, 2)) != 2) {
snd_printk("unable to send bytes 0x%02x:0x%02x to CS8427 (%i)\n", buf[0], buf[1], err);
snd_printk(KERN_ERR "unable to send bytes 0x%02x:0x%02x to CS8427 (%i)\n", buf[0], buf[1], err);
return err < 0 ? err : -EIO;
}
return 0;
Expand All @@ -87,11 +87,11 @@ static int snd_cs8427_reg_read(snd_i2c_device_t *device, unsigned char reg)
unsigned char buf;

if ((err = snd_i2c_sendbytes(device, &reg, 1)) != 1) {
snd_printk("unable to send register 0x%x byte to CS8427\n", reg);
snd_printk(KERN_ERR "unable to send register 0x%x byte to CS8427\n", reg);
return err < 0 ? err : -EIO;
}
if ((err = snd_i2c_readbytes(device, &buf, 1)) != 1) {
snd_printk("unable to read register 0x%x byte from CS8427\n", reg);
snd_printk(KERN_ERR "unable to read register 0x%x byte from CS8427\n", reg);
return err < 0 ? err : -EIO;
}
return buf;
Expand Down Expand Up @@ -210,7 +210,7 @@ int snd_cs8427_create(snd_i2c_bus_t *bus,
snd_i2c_lock(bus);
if ((err = snd_cs8427_reg_read(device, CS8427_REG_ID_AND_VER)) != CS8427_VER8427A) {
snd_i2c_unlock(bus);
snd_printk("unable to find CS8427 signature (expected 0x%x, read 0x%x), initialization is not completed\n", CS8427_VER8427A, err);
snd_printk(KERN_ERR "unable to find CS8427 signature (expected 0x%x, read 0x%x), initialization is not completed\n", CS8427_VER8427A, err);
return -EFAULT;
}
/* turn off run bit while making changes to configuration */
Expand Down Expand Up @@ -260,7 +260,7 @@ int snd_cs8427_create(snd_i2c_bus_t *bus,
snd_i2c_sendbytes(device, buf, 1);
snd_i2c_readbytes(device, buf, 127);
for (xx = 0; xx < 127; xx++)
printk("reg[0x%x] = 0x%x\n", xx+1, buf[xx]);
printk(KERN_DEBUG "reg[0x%x] = 0x%x\n", xx+1, buf[xx]);
}
#endif

Expand Down Expand Up @@ -354,12 +354,12 @@ static int snd_cs8427_qsubcode_get(snd_kcontrol_t *kcontrol,

snd_i2c_lock(device->bus);
if ((err = snd_i2c_sendbytes(device, &reg, 1)) != 1) {
snd_printk("unable to send register 0x%x byte to CS8427\n", reg);
snd_printk(KERN_ERR "unable to send register 0x%x byte to CS8427\n", reg);
snd_i2c_unlock(device->bus);
return err < 0 ? err : -EIO;
}
if ((err = snd_i2c_readbytes(device, ucontrol->value.bytes.data, 10)) != 10) {
snd_printk("unable to read Q-subcode bytes from CS8427\n");
snd_printk(KERN_ERR "unable to read Q-subcode bytes from CS8427\n");
snd_i2c_unlock(device->bus);
return err < 0 ? err : -EIO;
}
Expand Down
6 changes: 3 additions & 3 deletions sound/i2c/other/ak4114.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ static void reg_dump(ak4114_t *ak4114)
{
int i;

printk("AK4114 REG DUMP:\n");
printk(KERN_DEBUG "AK4114 REG DUMP:\n");
for (i = 0; i < 0x20; i++)
printk("reg[%02x] = %02x (%02x)\n", i, reg_read(ak4114, i), i < sizeof(ak4114->regmap) ? ak4114->regmap[i] : 0);
printk(KERN_DEBUG "reg[%02x] = %02x (%02x)\n", i, reg_read(ak4114, i), i < sizeof(ak4114->regmap) ? ak4114->regmap[i] : 0);
}
#endif

Expand Down Expand Up @@ -552,7 +552,7 @@ int snd_ak4114_check_rate_and_errors(ak4114_t *ak4114, unsigned int flags)
if (!(flags & AK4114_CHECK_NO_RATE) && runtime && runtime->rate != res) {
snd_pcm_stream_lock_irqsave(ak4114->capture_substream, _flags);
if (snd_pcm_running(ak4114->capture_substream)) {
// printk("rate changed (%i <- %i)\n", runtime->rate, res);
// printk(KERN_DEBUG "rate changed (%i <- %i)\n", runtime->rate, res);
snd_pcm_stop(ak4114->capture_substream, SNDRV_PCM_STATE_DRAINING);
res = 1;
}
Expand Down
8 changes: 4 additions & 4 deletions sound/i2c/other/ak4117.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ static void reg_dump(ak4117_t *ak4117)
{
int i;

printk("AK4117 REG DUMP:\n");
printk(KERN_DEBUG "AK4117 REG DUMP:\n");
for (i = 0; i < 0x1b; i++)
printk("reg[%02x] = %02x (%02x)\n", i, reg_read(ak4117, i), i < sizeof(ak4117->regmap) ? ak4117->regmap[i] : 0);
printk(KERN_DEBUG "reg[%02x] = %02x (%02x)\n", i, reg_read(ak4117, i), i < sizeof(ak4117->regmap) ? ak4117->regmap[i] : 0);
}
#endif

Expand Down Expand Up @@ -477,7 +477,7 @@ int snd_ak4117_check_rate_and_errors(ak4117_t *ak4117, unsigned int flags)
goto __rate;
rcs0 = reg_read(ak4117, AK4117_REG_RCS0);
rcs2 = reg_read(ak4117, AK4117_REG_RCS2);
// printk("AK IRQ: rcs0 = 0x%x, rcs1 = 0x%x, rcs2 = 0x%x\n", rcs0, rcs1, rcs2);
// printk(KERN_DEBUG "AK IRQ: rcs0 = 0x%x, rcs1 = 0x%x, rcs2 = 0x%x\n", rcs0, rcs1, rcs2);
spin_lock_irqsave(&ak4117->lock, _flags);
if (rcs0 & AK4117_PAR)
ak4117->parity_errors++;
Expand Down Expand Up @@ -530,7 +530,7 @@ int snd_ak4117_check_rate_and_errors(ak4117_t *ak4117, unsigned int flags)
if (!(flags & AK4117_CHECK_NO_RATE) && runtime && runtime->rate != res) {
snd_pcm_stream_lock_irqsave(ak4117->substream, _flags);
if (snd_pcm_running(ak4117->substream)) {
// printk("rate changed (%i <- %i)\n", runtime->rate, res);
// printk(KERN_DEBUG "rate changed (%i <- %i)\n", runtime->rate, res);
snd_pcm_stop(ak4117->substream, SNDRV_PCM_STATE_DRAINING);
wake_up(&runtime->sleep);
res = 1;
Expand Down
2 changes: 1 addition & 1 deletion sound/i2c/tea6330t.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ static void snd_tea6330t_set(tea6330t_t *tea,
unsigned char addr, unsigned char value)
{
#if 0
printk("set - 0x%x/0x%x\n", addr, value);
printk(KERN_DEBUG "set - 0x%x/0x%x\n", addr, value);
#endif
snd_i2c_write(tea->bus, TEA6330T_ADDR, addr, value, 1);
}
Expand Down
16 changes: 8 additions & 8 deletions sound/isa/ad1848/ad1848_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ void snd_ad1848_out(ad1848_t *chip,
udelay(100);
#ifdef CONFIG_SND_DEBUG
if (inb(AD1848P(chip, REGSEL)) & AD1848_INIT)
snd_printk("auto calibration time out - reg = 0x%x, value = 0x%x\n", reg, value);
snd_printk(KERN_WARNING "auto calibration time out - reg = 0x%x, value = 0x%x\n", reg, value);
#endif
outb(chip->mce_bit | reg, AD1848P(chip, REGSEL));
outb(chip->image[reg] = value, AD1848P(chip, REG));
Expand Down Expand Up @@ -139,7 +139,7 @@ static unsigned char snd_ad1848_in(ad1848_t *chip, unsigned char reg)
udelay(100);
#ifdef CONFIG_SND_DEBUG
if (inb(AD1848P(chip, REGSEL)) & AD1848_INIT)
snd_printk("auto calibration time out - reg = 0x%x\n", reg);
snd_printk(KERN_WARNING "auto calibration time out - reg = 0x%x\n", reg);
#endif
outb(chip->mce_bit | reg, AD1848P(chip, REGSEL));
mb();
Expand Down Expand Up @@ -185,13 +185,13 @@ static void snd_ad1848_mce_up(ad1848_t *chip)
udelay(100);
#ifdef CONFIG_SND_DEBUG
if (inb(AD1848P(chip, REGSEL)) & AD1848_INIT)
snd_printk("mce_up - auto calibration time out (0)\n");
snd_printk(KERN_WARNING "mce_up - auto calibration time out (0)\n");
#endif
spin_lock_irqsave(&chip->reg_lock, flags);
chip->mce_bit |= AD1848_MCE;
timeout = inb(AD1848P(chip, REGSEL));
if (timeout == 0x80)
snd_printk("mce_up [0x%lx]: serious init problem - codec still busy\n", chip->port);
snd_printk(KERN_WARNING "mce_up [0x%lx]: serious init problem - codec still busy\n", chip->port);
if (!(timeout & AD1848_MCE))
outb(chip->mce_bit | (timeout & 0x1f), AD1848P(chip, REGSEL));
spin_unlock_irqrestore(&chip->reg_lock, flags);
Expand All @@ -214,13 +214,13 @@ static void snd_ad1848_mce_down(ad1848_t *chip)
#endif
#ifdef CONFIG_SND_DEBUG
if (inb(AD1848P(chip, REGSEL)) & AD1848_INIT)
snd_printk("mce_down [0x%lx] - auto calibration time out (0)\n", AD1848P(chip, REGSEL));
snd_printk(KERN_WARNING "mce_down [0x%lx] - auto calibration time out (0)\n", AD1848P(chip, REGSEL));
#endif
chip->mce_bit &= ~AD1848_MCE;
timeout = inb(AD1848P(chip, REGSEL));
outb(chip->mce_bit | (timeout & 0x1f), AD1848P(chip, REGSEL));
if (timeout == 0x80)
snd_printk("mce_down [0x%lx]: serious init problem - codec still busy\n", chip->port);
snd_printk(KERN_WARNING "mce_down [0x%lx]: serious init problem - codec still busy\n", chip->port);
if ((timeout & AD1848_MCE) == 0) {
spin_unlock_irqrestore(&chip->reg_lock, flags);
return;
Expand All @@ -240,7 +240,7 @@ static void snd_ad1848_mce_down(ad1848_t *chip)
while (snd_ad1848_in(chip, AD1848_TEST_INIT) & AD1848_CALIB_IN_PROGRESS) {
spin_unlock_irqrestore(&chip->reg_lock, flags);
if (time <= 0) {
snd_printk("mce_down - auto calibration time out (2)\n");
snd_printk(KERN_ERR "mce_down - auto calibration time out (2)\n");
return;
}
set_current_state(TASK_INTERRUPTIBLE);
Expand All @@ -254,7 +254,7 @@ static void snd_ad1848_mce_down(ad1848_t *chip)
while (inb(AD1848P(chip, REGSEL)) & AD1848_INIT) {
spin_unlock_irqrestore(&chip->reg_lock, flags);
if (time <= 0) {
snd_printk("mce_down - auto calibration time out (3)\n");
snd_printk(KERN_ERR "mce_down - auto calibration time out (3)\n");
return;
}
set_current_state(TASK_INTERRUPTIBLE);
Expand Down
34 changes: 19 additions & 15 deletions sound/isa/es18xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ static int snd_es18xx_dsp_command(es18xx_t *chip, unsigned char val)
outb(val, chip->port + 0x0C);
return 0;
}
snd_printk("dsp_command: timeout (0x%x)\n", val);
snd_printk(KERN_ERR "dsp_command: timeout (0x%x)\n", val);
return -EINVAL;
}

Expand All @@ -184,7 +184,8 @@ static int snd_es18xx_dsp_get_byte(es18xx_t *chip)
for(i = MILLISECOND/10; i; i--)
if (inb(chip->port + 0x0C) & 0x40)
return inb(chip->port + 0x0A);
snd_printk("dsp_get_byte failed: 0x%lx = 0x%x!!!\n", chip->port + 0x0A, inb(chip->port + 0x0A));
snd_printk(KERN_ERR "dsp_get_byte failed: 0x%lx = 0x%x!!!\n",
chip->port + 0x0A, inb(chip->port + 0x0A));
return -ENODEV;
}

Expand All @@ -204,7 +205,7 @@ static int snd_es18xx_write(es18xx_t *chip,
end:
spin_unlock_irqrestore(&chip->reg_lock, flags);
#ifdef REG_DEBUG
snd_printk("Reg %02x set to %02x\n", reg, data);
snd_printk(KERN_DEBUG "Reg %02x set to %02x\n", reg, data);
#endif
return ret;
}
Expand All @@ -223,7 +224,7 @@ static int snd_es18xx_read(es18xx_t *chip, unsigned char reg)
data = snd_es18xx_dsp_get_byte(chip);
ret = data;
#ifdef REG_DEBUG
snd_printk("Reg %02x now is %02x (%d)\n", reg, data, ret);
snd_printk(KERN_DEBUG "Reg %02x now is %02x (%d)\n", reg, data, ret);
#endif
end:
spin_unlock_irqrestore(&chip->reg_lock, flags);
Expand Down Expand Up @@ -259,7 +260,8 @@ static int snd_es18xx_bits(es18xx_t *chip, unsigned char reg,
if (ret < 0)
goto end;
#ifdef REG_DEBUG
snd_printk("Reg %02x was %02x, set to %02x (%d)\n", reg, old, new, ret);
snd_printk(KERN_DEBUG "Reg %02x was %02x, set to %02x (%d)\n",
reg, old, new, ret);
#endif
}
ret = oval;
Expand All @@ -277,7 +279,7 @@ static inline void snd_es18xx_mixer_write(es18xx_t *chip,
outb(data, chip->port + 0x05);
spin_unlock_irqrestore(&chip->mixer_lock, flags);
#ifdef REG_DEBUG
snd_printk("Mixer reg %02x set to %02x\n", reg, data);
snd_printk(KERN_DEBUG "Mixer reg %02x set to %02x\n", reg, data);
#endif
}

Expand All @@ -290,7 +292,7 @@ static inline int snd_es18xx_mixer_read(es18xx_t *chip, unsigned char reg)
data = inb(chip->port + 0x05);
spin_unlock_irqrestore(&chip->mixer_lock, flags);
#ifdef REG_DEBUG
snd_printk("Mixer reg %02x now is %02x\n", reg, data);
snd_printk(KERN_DEBUG "Mixer reg %02x now is %02x\n", reg, data);
#endif
return data;
}
Expand All @@ -309,7 +311,8 @@ static inline int snd_es18xx_mixer_bits(es18xx_t *chip, unsigned char reg,
new = (old & ~mask) | (val & mask);
outb(new, chip->port + 0x05);
#ifdef REG_DEBUG
snd_printk("Mixer reg %02x was %02x, set to %02x\n", reg, old, new);
snd_printk(KERN_DEBUG "Mixer reg %02x was %02x, set to %02x\n",
reg, old, new);
#endif
}
spin_unlock_irqrestore(&chip->mixer_lock, flags);
Expand All @@ -329,7 +332,8 @@ static inline int snd_es18xx_mixer_writable(es18xx_t *chip, unsigned char reg,
new = inb(chip->port + 0x05);
spin_unlock_irqrestore(&chip->mixer_lock, flags);
#ifdef REG_DEBUG
snd_printk("Mixer reg %02x was %02x, set to %02x, now is %02x\n", reg, old, expected, new);
snd_printk(KERN_DEBUG "Mixer reg %02x was %02x, set to %02x, now is %02x\n",
reg, old, expected, new);
#endif
return expected == new;
}
Expand Down Expand Up @@ -1281,7 +1285,7 @@ static void __devinit snd_es18xx_config_write(es18xx_t *chip,
outb(reg, chip->ctrl_port);
outb(data, chip->ctrl_port + 1);
#ifdef REG_DEBUG
snd_printk("Config reg %02x set to %02x\n", reg, data);
snd_printk(KERN_DEBUG "Config reg %02x set to %02x\n", reg, data);
#endif
}

Expand Down Expand Up @@ -1346,7 +1350,7 @@ static int __devinit snd_es18xx_initialize(es18xx_t *chip)
irqmask = 3;
break;
default:
snd_printk("invalid irq %d\n", chip->irq);
snd_printk(KERN_ERR "invalid irq %d\n", chip->irq);
return -ENODEV;
}
switch (chip->dma1) {
Expand All @@ -1360,7 +1364,7 @@ static int __devinit snd_es18xx_initialize(es18xx_t *chip)
dma1mask = 3;
break;
default:
snd_printk("invalid dma1 %d\n", chip->dma1);
snd_printk(KERN_ERR "invalid dma1 %d\n", chip->dma1);
return -ENODEV;
}
switch (chip->dma2) {
Expand All @@ -1377,7 +1381,7 @@ static int __devinit snd_es18xx_initialize(es18xx_t *chip)
dma2mask = 3;
break;
default:
snd_printk("invalid dma2 %d\n", chip->dma2);
snd_printk(KERN_ERR "invalid dma2 %d\n", chip->dma2);
return -ENODEV;
}

Expand Down Expand Up @@ -1440,7 +1444,7 @@ static int __devinit snd_es18xx_identify(es18xx_t *chip)

/* reset */
if (snd_es18xx_reset(chip) < 0) {
snd_printk("reset at 0x%lx failed!!!\n", chip->port);
snd_printk(KERN_ERR "reset at 0x%lx failed!!!\n", chip->port);
return -ENODEV;
}

Expand Down Expand Up @@ -1527,7 +1531,7 @@ static int __devinit snd_es18xx_probe(es18xx_t *chip)
chip->caps = ES18XX_PCM2 | ES18XX_RECMIX | ES18XX_AUXB | ES18XX_DUPLEX_SAME | ES18XX_HWV;
break;
default:
snd_printk("[0x%lx] unsupported chip ES%x\n",
snd_printk(KERN_ERR "[0x%lx] unsupported chip ES%x\n",
chip->port, chip->version);
return -ENODEV;
}
Expand Down
2 changes: 1 addition & 1 deletion sound/isa/gus/gus_dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ int snd_gf1_dma_transfer_block(snd_gus_card_t * gus,

block = kmalloc(sizeof(*block), atomic ? GFP_ATOMIC : GFP_KERNEL);
if (block == NULL) {
snd_printk("gf1: DMA transfer failure; not enough memory\n");
snd_printk(KERN_ERR "gf1: DMA transfer failure; not enough memory\n");
return -ENOMEM;
}
*block = *__block;
Expand Down
Loading

0 comments on commit 99b359b

Please sign in to comment.