diff options
author | Takashi Iwai <tiwai@suse.de> | 2014-02-26 06:06:24 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2014-02-26 10:45:32 -0500 |
commit | 09ae539e4d8fda9729e44e57967f7133dadc3f1e (patch) | |
tree | 99ddce8f4b1641ac575458ec651a6dc37f43dcac | |
parent | e3a471d6680487c693ab82b197e37688174cefc6 (diff) |
ALSA: rme9652: Use standard printk helpers
Convert with dev_err() and co from snd_printk(), etc.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r-- | sound/pci/rme9652/rme9652.c | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/sound/pci/rme9652/rme9652.c b/sound/pci/rme9652/rme9652.c index a62d6e13d8ce..1d9be90f7748 100644 --- a/sound/pci/rme9652/rme9652.c +++ b/sound/pci/rme9652/rme9652.c | |||
@@ -394,7 +394,9 @@ static snd_pcm_uframes_t rme9652_hw_pointer(struct snd_rme9652 *rme9652) | |||
394 | if (offset < period_size) { | 394 | if (offset < period_size) { |
395 | if (offset > rme9652->max_jitter) { | 395 | if (offset > rme9652->max_jitter) { |
396 | if (frag) | 396 | if (frag) |
397 | printk(KERN_ERR "Unexpected hw_pointer position (bufid == 0): status: %x offset: %d\n", status, offset); | 397 | dev_err(rme9652->card->dev, |
398 | "Unexpected hw_pointer position (bufid == 0): status: %x offset: %d\n", | ||
399 | status, offset); | ||
398 | } else if (!frag) | 400 | } else if (!frag) |
399 | return 0; | 401 | return 0; |
400 | offset -= rme9652->max_jitter; | 402 | offset -= rme9652->max_jitter; |
@@ -403,7 +405,9 @@ static snd_pcm_uframes_t rme9652_hw_pointer(struct snd_rme9652 *rme9652) | |||
403 | } else { | 405 | } else { |
404 | if (offset > period_size + rme9652->max_jitter) { | 406 | if (offset > period_size + rme9652->max_jitter) { |
405 | if (!frag) | 407 | if (!frag) |
406 | printk(KERN_ERR "Unexpected hw_pointer position (bufid == 1): status: %x offset: %d\n", status, offset); | 408 | dev_err(rme9652->card->dev, |
409 | "Unexpected hw_pointer position (bufid == 1): status: %x offset: %d\n", | ||
410 | status, offset); | ||
407 | } else if (frag) | 411 | } else if (frag) |
408 | return period_size; | 412 | return period_size; |
409 | offset -= rme9652->max_jitter; | 413 | offset -= rme9652->max_jitter; |
@@ -769,7 +773,8 @@ static inline int rme9652_spdif_sample_rate(struct snd_rme9652 *s) | |||
769 | break; | 773 | break; |
770 | 774 | ||
771 | default: | 775 | default: |
772 | snd_printk(KERN_ERR "%s: unknown S/PDIF input rate (bits = 0x%x)\n", | 776 | dev_err(s->card->dev, |
777 | "%s: unknown S/PDIF input rate (bits = 0x%x)\n", | ||
773 | s->card_name, rate_bits); | 778 | s->card_name, rate_bits); |
774 | return 0; | 779 | return 0; |
775 | break; | 780 | break; |
@@ -1790,7 +1795,8 @@ static int snd_rme9652_initialize_memory(struct snd_rme9652 *rme9652) | |||
1790 | snd_hammerfall_get_buffer(rme9652->pci, &rme9652->playback_dma_buf, RME9652_DMA_AREA_BYTES) < 0) { | 1795 | snd_hammerfall_get_buffer(rme9652->pci, &rme9652->playback_dma_buf, RME9652_DMA_AREA_BYTES) < 0) { |
1791 | if (rme9652->capture_dma_buf.area) | 1796 | if (rme9652->capture_dma_buf.area) |
1792 | snd_dma_free_pages(&rme9652->capture_dma_buf); | 1797 | snd_dma_free_pages(&rme9652->capture_dma_buf); |
1793 | printk(KERN_ERR "%s: no buffers available\n", rme9652->card_name); | 1798 | dev_err(rme9652->card->dev, |
1799 | "%s: no buffers available\n", rme9652->card_name); | ||
1794 | return -ENOMEM; | 1800 | return -ENOMEM; |
1795 | } | 1801 | } |
1796 | 1802 | ||
@@ -2468,13 +2474,14 @@ static int snd_rme9652_create(struct snd_card *card, | |||
2468 | rme9652->port = pci_resource_start(pci, 0); | 2474 | rme9652->port = pci_resource_start(pci, 0); |
2469 | rme9652->iobase = ioremap_nocache(rme9652->port, RME9652_IO_EXTENT); | 2475 | rme9652->iobase = ioremap_nocache(rme9652->port, RME9652_IO_EXTENT); |
2470 | if (rme9652->iobase == NULL) { | 2476 | if (rme9652->iobase == NULL) { |
2471 | snd_printk(KERN_ERR "unable to remap region 0x%lx-0x%lx\n", rme9652->port, rme9652->port + RME9652_IO_EXTENT - 1); | 2477 | dev_err(card->dev, "unable to remap region 0x%lx-0x%lx\n", |
2478 | rme9652->port, rme9652->port + RME9652_IO_EXTENT - 1); | ||
2472 | return -EBUSY; | 2479 | return -EBUSY; |
2473 | } | 2480 | } |
2474 | 2481 | ||
2475 | if (request_irq(pci->irq, snd_rme9652_interrupt, IRQF_SHARED, | 2482 | if (request_irq(pci->irq, snd_rme9652_interrupt, IRQF_SHARED, |
2476 | KBUILD_MODNAME, rme9652)) { | 2483 | KBUILD_MODNAME, rme9652)) { |
2477 | snd_printk(KERN_ERR "unable to request IRQ %d\n", pci->irq); | 2484 | dev_err(card->dev, "unable to request IRQ %d\n", pci->irq); |
2478 | return -EBUSY; | 2485 | return -EBUSY; |
2479 | } | 2486 | } |
2480 | rme9652->irq = pci->irq; | 2487 | rme9652->irq = pci->irq; |