提交 26bc6964 编写于 作者: T Takashi Iwai

ALSA: emu10k1x: Use standard printk helpers

Convert with dev_err() and co from snd_printk(), etc.
Signed-off-by: NTakashi Iwai <tiwai@suse.de>
上级 ece7a36d
...@@ -369,7 +369,8 @@ static void snd_emu10k1x_pcm_interrupt(struct emu10k1x *emu, struct emu10k1x_voi ...@@ -369,7 +369,8 @@ static void snd_emu10k1x_pcm_interrupt(struct emu10k1x *emu, struct emu10k1x_voi
if (epcm->substream == NULL) if (epcm->substream == NULL)
return; return;
#if 0 #if 0
snd_printk(KERN_INFO "IRQ: position = 0x%x, period = 0x%x, size = 0x%x\n", dev_info(emu->card->dev,
"IRQ: position = 0x%x, period = 0x%x, size = 0x%x\n",
epcm->substream->ops->pointer(epcm->substream), epcm->substream->ops->pointer(epcm->substream),
snd_pcm_lib_period_bytes(epcm->substream), snd_pcm_lib_period_bytes(epcm->substream),
snd_pcm_lib_buffer_bytes(epcm->substream)); snd_pcm_lib_buffer_bytes(epcm->substream));
...@@ -487,7 +488,11 @@ static int snd_emu10k1x_pcm_trigger(struct snd_pcm_substream *substream, ...@@ -487,7 +488,11 @@ static int snd_emu10k1x_pcm_trigger(struct snd_pcm_substream *substream,
int channel = epcm->voice->number; int channel = epcm->voice->number;
int result = 0; int result = 0;
// snd_printk(KERN_INFO "trigger - emu10k1x = 0x%x, cmd = %i, pointer = %d\n", (int)emu, cmd, (int)substream->ops->pointer(substream)); /*
dev_dbg(emu->card->dev,
"trigger - emu10k1x = 0x%x, cmd = %i, pointer = %d\n",
(int)emu, cmd, (int)substream->ops->pointer(substream));
*/
switch (cmd) { switch (cmd) {
case SNDRV_PCM_TRIGGER_START: case SNDRV_PCM_TRIGGER_START:
...@@ -826,7 +831,7 @@ static irqreturn_t snd_emu10k1x_interrupt(int irq, void *dev_id) ...@@ -826,7 +831,7 @@ static irqreturn_t snd_emu10k1x_interrupt(int irq, void *dev_id)
// acknowledge the interrupt if necessary // acknowledge the interrupt if necessary
outl(status, chip->port + IPR); outl(status, chip->port + IPR);
// snd_printk(KERN_INFO "interrupt %08x\n", status); /* dev_dbg(chip->card->dev, "interrupt %08x\n", status); */
return IRQ_HANDLED; return IRQ_HANDLED;
} }
...@@ -919,7 +924,7 @@ static int snd_emu10k1x_create(struct snd_card *card, ...@@ -919,7 +924,7 @@ static int snd_emu10k1x_create(struct snd_card *card,
return err; return err;
if (pci_set_dma_mask(pci, DMA_BIT_MASK(28)) < 0 || if (pci_set_dma_mask(pci, DMA_BIT_MASK(28)) < 0 ||
pci_set_consistent_dma_mask(pci, DMA_BIT_MASK(28)) < 0) { pci_set_consistent_dma_mask(pci, DMA_BIT_MASK(28)) < 0) {
snd_printk(KERN_ERR "error to set 28bit mask DMA\n"); dev_err(card->dev, "error to set 28bit mask DMA\n");
pci_disable_device(pci); pci_disable_device(pci);
return -ENXIO; return -ENXIO;
} }
...@@ -940,14 +945,15 @@ static int snd_emu10k1x_create(struct snd_card *card, ...@@ -940,14 +945,15 @@ static int snd_emu10k1x_create(struct snd_card *card,
chip->port = pci_resource_start(pci, 0); chip->port = pci_resource_start(pci, 0);
if ((chip->res_port = request_region(chip->port, 8, if ((chip->res_port = request_region(chip->port, 8,
"EMU10K1X")) == NULL) { "EMU10K1X")) == NULL) {
snd_printk(KERN_ERR "emu10k1x: cannot allocate the port 0x%lx\n", chip->port); dev_err(card->dev, "cannot allocate the port 0x%lx\n",
chip->port);
snd_emu10k1x_free(chip); snd_emu10k1x_free(chip);
return -EBUSY; return -EBUSY;
} }
if (request_irq(pci->irq, snd_emu10k1x_interrupt, if (request_irq(pci->irq, snd_emu10k1x_interrupt,
IRQF_SHARED, KBUILD_MODNAME, chip)) { IRQF_SHARED, KBUILD_MODNAME, chip)) {
snd_printk(KERN_ERR "emu10k1x: cannot grab irq %d\n", pci->irq); dev_err(card->dev, "cannot grab irq %d\n", pci->irq);
snd_emu10k1x_free(chip); snd_emu10k1x_free(chip);
return -EBUSY; return -EBUSY;
} }
...@@ -964,7 +970,7 @@ static int snd_emu10k1x_create(struct snd_card *card, ...@@ -964,7 +970,7 @@ static int snd_emu10k1x_create(struct snd_card *card,
chip->revision = pci->revision; chip->revision = pci->revision;
pci_read_config_dword(pci, PCI_SUBSYSTEM_VENDOR_ID, &chip->serial); pci_read_config_dword(pci, PCI_SUBSYSTEM_VENDOR_ID, &chip->serial);
pci_read_config_word(pci, PCI_SUBSYSTEM_ID, &chip->model); pci_read_config_word(pci, PCI_SUBSYSTEM_ID, &chip->model);
snd_printk(KERN_INFO "Model %04x Rev %08x Serial %08x\n", chip->model, dev_info(card->dev, "Model %04x Rev %08x Serial %08x\n", chip->model,
chip->revision, chip->serial); chip->revision, chip->serial);
outl(0, chip->port + INTE); outl(0, chip->port + INTE);
...@@ -1248,7 +1254,9 @@ static void mpu401_clear_rx(struct emu10k1x *emu, struct emu10k1x_midi *mpu) ...@@ -1248,7 +1254,9 @@ static void mpu401_clear_rx(struct emu10k1x *emu, struct emu10k1x_midi *mpu)
mpu401_read_data(emu, mpu); mpu401_read_data(emu, mpu);
#ifdef CONFIG_SND_DEBUG #ifdef CONFIG_SND_DEBUG
if (timeout <= 0) if (timeout <= 0)
snd_printk(KERN_ERR "cmd: clear rx timeout (status = 0x%x)\n", mpu401_read_stat(emu, mpu)); dev_err(emu->card->dev,
"cmd: clear rx timeout (status = 0x%x)\n",
mpu401_read_stat(emu, mpu));
#endif #endif
} }
...@@ -1322,7 +1330,8 @@ static int snd_emu10k1x_midi_cmd(struct emu10k1x * emu, ...@@ -1322,7 +1330,8 @@ static int snd_emu10k1x_midi_cmd(struct emu10k1x * emu,
} }
spin_unlock_irqrestore(&midi->input_lock, flags); spin_unlock_irqrestore(&midi->input_lock, flags);
if (!ok) { if (!ok) {
snd_printk(KERN_ERR "midi_cmd: 0x%x failed at 0x%lx (status = 0x%x, data = 0x%x)!!!\n", dev_err(emu->card->dev,
"midi_cmd: 0x%x failed at 0x%lx (status = 0x%x, data = 0x%x)!!!\n",
cmd, emu->port, cmd, emu->port,
mpu401_read_stat(emu, midi), mpu401_read_stat(emu, midi),
mpu401_read_data(emu, midi)); mpu401_read_data(emu, midi));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册