Skip to content

Commit

Permalink
ALSA: cs5530: Use standard printk helpers
Browse files Browse the repository at this point in the history
Convert with dev_err() and co from snd_printk(), etc.

Signed-off-by: Takashi Iwai <[email protected]>
  • Loading branch information
tiwai committed Feb 26, 2014
1 parent b055e7b commit 132b387
Showing 1 changed file with 11 additions and 12 deletions.
23 changes: 11 additions & 12 deletions sound/pci/cs5530.c
Original file line number Diff line number Diff line change
Expand Up @@ -160,17 +160,17 @@ static int snd_cs5530_create(struct snd_card *card,
sb_base = 0x220 + 0x20 * (map & 3);

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 {
printk(KERN_ERR "Could not find XpressAudio!\n");
dev_err(card->dev, "Could not find XpressAudio!\n");
snd_cs5530_free(chip);
return -ENODEV;
}

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))
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;
dma8 = snd_cs5530_mixer_read(sb_base, 0x81);
Expand All @@ -182,7 +182,7 @@ static int snd_cs5530_create(struct snd_card *card,
else if (dma8 & 0x80)
dma16 = 7;
else {
printk(KERN_ERR "CS5530: No 16bit DMA enabled\n");
dev_err(card->dev, "No 16bit DMA enabled\n");
snd_cs5530_free(chip);
return -ENODEV;
}
Expand All @@ -194,7 +194,7 @@ static int snd_cs5530_create(struct snd_card *card,
else if (dma8 & 0x08)
dma8 = 3;
else {
printk(KERN_ERR "CS5530: No 8bit DMA enabled\n");
dev_err(card->dev, "No 8bit DMA enabled\n");
snd_cs5530_free(chip);
return -ENODEV;
}
Expand All @@ -208,32 +208,31 @@ static int snd_cs5530_create(struct snd_card *card,
else if (irq & 8)
irq = 10;
else {
printk(KERN_ERR "CS5530: SoundBlaster IRQ not set\n");
dev_err(card->dev, "SoundBlaster IRQ not set\n");
snd_cs5530_free(chip);
return -ENODEV;
}

printk(KERN_INFO "CS5530: IRQ: %d DMA8: %d DMA16: %d\n", irq, dma8,
dma16);
dev_info(card->dev, "IRQ: %d DMA8: %d DMA16: %d\n", irq, dma8, dma16);

err = snd_sbdsp_create(card, sb_base, irq, snd_sb16dsp_interrupt, dma8,
dma16, SB_HW_CS5530, &chip->sb);
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);
return err;
}

err = snd_sb16dsp_pcm(chip->sb, 0, &chip->sb->pcm);
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);
return err;
}

err = snd_sbmixer_new(chip->sb);
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);
return err;
}
Expand Down

0 comments on commit 132b387

Please sign in to comment.