Skip to content

Commit

Permalink
ALSA: rme9652: 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 <tiwai@suse.de>
  • Loading branch information
Takashi Iwai committed Feb 26, 2014
1 parent e3a471d commit 09ae539
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions sound/pci/rme9652/rme9652.c
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,9 @@ static snd_pcm_uframes_t rme9652_hw_pointer(struct snd_rme9652 *rme9652)
if (offset < period_size) {
if (offset > rme9652->max_jitter) {
if (frag)
printk(KERN_ERR "Unexpected hw_pointer position (bufid == 0): status: %x offset: %d\n", status, offset);
dev_err(rme9652->card->dev,
"Unexpected hw_pointer position (bufid == 0): status: %x offset: %d\n",
status, offset);
} else if (!frag)
return 0;
offset -= rme9652->max_jitter;
Expand All @@ -403,7 +405,9 @@ static snd_pcm_uframes_t rme9652_hw_pointer(struct snd_rme9652 *rme9652)
} else {
if (offset > period_size + rme9652->max_jitter) {
if (!frag)
printk(KERN_ERR "Unexpected hw_pointer position (bufid == 1): status: %x offset: %d\n", status, offset);
dev_err(rme9652->card->dev,
"Unexpected hw_pointer position (bufid == 1): status: %x offset: %d\n",
status, offset);
} else if (frag)
return period_size;
offset -= rme9652->max_jitter;
Expand Down Expand Up @@ -769,7 +773,8 @@ static inline int rme9652_spdif_sample_rate(struct snd_rme9652 *s)
break;

default:
snd_printk(KERN_ERR "%s: unknown S/PDIF input rate (bits = 0x%x)\n",
dev_err(s->card->dev,
"%s: unknown S/PDIF input rate (bits = 0x%x)\n",
s->card_name, rate_bits);
return 0;
break;
Expand Down Expand Up @@ -1790,7 +1795,8 @@ static int snd_rme9652_initialize_memory(struct snd_rme9652 *rme9652)
snd_hammerfall_get_buffer(rme9652->pci, &rme9652->playback_dma_buf, RME9652_DMA_AREA_BYTES) < 0) {
if (rme9652->capture_dma_buf.area)
snd_dma_free_pages(&rme9652->capture_dma_buf);
printk(KERN_ERR "%s: no buffers available\n", rme9652->card_name);
dev_err(rme9652->card->dev,
"%s: no buffers available\n", rme9652->card_name);
return -ENOMEM;
}

Expand Down Expand Up @@ -2468,13 +2474,14 @@ static int snd_rme9652_create(struct snd_card *card,
rme9652->port = pci_resource_start(pci, 0);
rme9652->iobase = ioremap_nocache(rme9652->port, RME9652_IO_EXTENT);
if (rme9652->iobase == NULL) {
snd_printk(KERN_ERR "unable to remap region 0x%lx-0x%lx\n", rme9652->port, rme9652->port + RME9652_IO_EXTENT - 1);
dev_err(card->dev, "unable to remap region 0x%lx-0x%lx\n",
rme9652->port, rme9652->port + RME9652_IO_EXTENT - 1);
return -EBUSY;
}

if (request_irq(pci->irq, snd_rme9652_interrupt, IRQF_SHARED,
KBUILD_MODNAME, rme9652)) {
snd_printk(KERN_ERR "unable to request IRQ %d\n", pci->irq);
dev_err(card->dev, "unable to request IRQ %d\n", pci->irq);
return -EBUSY;
}
rme9652->irq = pci->irq;
Expand Down

0 comments on commit 09ae539

Please sign in to comment.