Commit 132b3873 authored by Takashi Iwai's avatar Takashi Iwai

ALSA: cs5530: Use standard printk helpers

Convert with dev_err() and co from snd_printk(), etc.
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent b055e7b4
...@@ -160,17 +160,17 @@ static int snd_cs5530_create(struct snd_card *card, ...@@ -160,17 +160,17 @@ static int snd_cs5530_create(struct snd_card *card,
sb_base = 0x220 + 0x20 * (map & 3); sb_base = 0x220 + 0x20 * (map & 3);
if (map & (1<<2)) if (map & (1<<2))
printk(KERN_INFO "CS5530: XpressAudio at 0x%lx\n", sb_base); dev_info(card->dev, "XpressAudio at 0x%lx\n", sb_base);
else { else {
printk(KERN_ERR "Could not find XpressAudio!\n"); dev_err(card->dev, "Could not find XpressAudio!\n");
snd_cs5530_free(chip); snd_cs5530_free(chip);
return -ENODEV; return -ENODEV;
} }
if (map & (1<<5)) if (map & (1<<5))
printk(KERN_INFO "CS5530: MPU at 0x300\n"); dev_info(card->dev, "MPU at 0x300\n");
else if (map & (1<<6)) else if (map & (1<<6))
printk(KERN_INFO "CS5530: MPU at 0x330\n"); dev_info(card->dev, "MPU at 0x330\n");
irq = snd_cs5530_mixer_read(sb_base, 0x80) & 0x0F; irq = snd_cs5530_mixer_read(sb_base, 0x80) & 0x0F;
dma8 = snd_cs5530_mixer_read(sb_base, 0x81); dma8 = snd_cs5530_mixer_read(sb_base, 0x81);
...@@ -182,7 +182,7 @@ static int snd_cs5530_create(struct snd_card *card, ...@@ -182,7 +182,7 @@ static int snd_cs5530_create(struct snd_card *card,
else if (dma8 & 0x80) else if (dma8 & 0x80)
dma16 = 7; dma16 = 7;
else { else {
printk(KERN_ERR "CS5530: No 16bit DMA enabled\n"); dev_err(card->dev, "No 16bit DMA enabled\n");
snd_cs5530_free(chip); snd_cs5530_free(chip);
return -ENODEV; return -ENODEV;
} }
...@@ -194,7 +194,7 @@ static int snd_cs5530_create(struct snd_card *card, ...@@ -194,7 +194,7 @@ static int snd_cs5530_create(struct snd_card *card,
else if (dma8 & 0x08) else if (dma8 & 0x08)
dma8 = 3; dma8 = 3;
else { else {
printk(KERN_ERR "CS5530: No 8bit DMA enabled\n"); dev_err(card->dev, "No 8bit DMA enabled\n");
snd_cs5530_free(chip); snd_cs5530_free(chip);
return -ENODEV; return -ENODEV;
} }
...@@ -208,32 +208,31 @@ static int snd_cs5530_create(struct snd_card *card, ...@@ -208,32 +208,31 @@ static int snd_cs5530_create(struct snd_card *card,
else if (irq & 8) else if (irq & 8)
irq = 10; irq = 10;
else { else {
printk(KERN_ERR "CS5530: SoundBlaster IRQ not set\n"); dev_err(card->dev, "SoundBlaster IRQ not set\n");
snd_cs5530_free(chip); snd_cs5530_free(chip);
return -ENODEV; return -ENODEV;
} }
printk(KERN_INFO "CS5530: IRQ: %d DMA8: %d DMA16: %d\n", irq, dma8, dev_info(card->dev, "IRQ: %d DMA8: %d DMA16: %d\n", irq, dma8, dma16);
dma16);
err = snd_sbdsp_create(card, sb_base, irq, snd_sb16dsp_interrupt, dma8, err = snd_sbdsp_create(card, sb_base, irq, snd_sb16dsp_interrupt, dma8,
dma16, SB_HW_CS5530, &chip->sb); dma16, SB_HW_CS5530, &chip->sb);
if (err < 0) { if (err < 0) {
printk(KERN_ERR "CS5530: Could not create SoundBlaster\n"); dev_err(card->dev, "Could not create SoundBlaster\n");
snd_cs5530_free(chip); snd_cs5530_free(chip);
return err; return err;
} }
err = snd_sb16dsp_pcm(chip->sb, 0, &chip->sb->pcm); err = snd_sb16dsp_pcm(chip->sb, 0, &chip->sb->pcm);
if (err < 0) { if (err < 0) {
printk(KERN_ERR "CS5530: Could not create PCM\n"); dev_err(card->dev, "Could not create PCM\n");
snd_cs5530_free(chip); snd_cs5530_free(chip);
return err; return err;
} }
err = snd_sbmixer_new(chip->sb); err = snd_sbmixer_new(chip->sb);
if (err < 0) { if (err < 0) {
printk(KERN_ERR "CS5530: Could not create Mixer\n"); dev_err(card->dev, "Could not create Mixer\n");
snd_cs5530_free(chip); snd_cs5530_free(chip);
return err; return err;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment